Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: [IOBP-982] Add outcome 99 screen into payment flow #6424

Merged
merged 4 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1982,6 +1982,9 @@ wallet:
PLAFOND_LIMIT_ERROR:
title: Hai superato il limite di spesa della tua carta
subtitle: Non è stato addebitato alcun importo. Prima di riprovare, modifica il limite di spesa o usa un altro metodo di pagamento.
BE_NODE_KO:
title: Stiamo riscontrando alcuni problemi sui sistemi di pagamento
subtitle: Verifica l’esito del pagamento nella sezione Pagamenti, altrimenti attendi qualche minuto prima di riprovare.
support:
button: "Contatta l'assistenza"
supportTitle: Contatta l'assistenza
Expand Down
3 changes: 3 additions & 0 deletions locales/it/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1983,6 +1983,9 @@ wallet:
PLAFOND_LIMIT_ERROR:
title: Hai superato il limite di spesa della tua carta
subtitle: Non è stato addebitato alcun importo. Prima di riprovare, modifica il limite di spesa o usa un altro metodo di pagamento.
BE_NODE_KO:
title: Stiamo riscontrando alcuni problemi sui sistemi di pagamento
subtitle: Verifica l’esito del pagamento nella sezione Pagamenti, altrimenti attendi qualche minuto prima di riprovare.
support:
button: "Contatta l'assistenza"
supportTitle: Contatta l'assistenza
Expand Down
15 changes: 15 additions & 0 deletions ts/features/payments/checkout/analytics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export type PaymentAnalyticsProps = {
editing: PaymentAnalyticsEditingType;
};

// eslint-disable-next-line complexity
export const getPaymentAnalyticsEventFromFailureOutcome = (
outcome: WalletPaymentOutcomeEnum
) => {
Expand Down Expand Up @@ -68,6 +69,20 @@ export const getPaymentAnalyticsEventFromFailureOutcome = (
return "PAYMENT_WEBVIEW_USER_CANCELLATION";
case WalletPaymentOutcomeEnum.PAYPAL_REMOVED_ERROR:
return "PAYMENT_METHOD_AUTHORIZATION_ERROR";
case WalletPaymentOutcomeEnum.BE_NODE_KO:
return "PAYMENT_SLOWDOWN_ERROR";
case WalletPaymentOutcomeEnum.INSUFFICIENT_AVAILABILITY_ERROR:
return "PAYMENT_INSUFFICIENT_AVAILABILITY_ERROR";
case WalletPaymentOutcomeEnum.CVV_ERROR:
return "PAYMENT_CVV_ERROR";
case WalletPaymentOutcomeEnum.PLAFOND_LIMIT_ERROR:
return "PAYMENT_PLAFOND_LIMIT_ERROR";
case WalletPaymentOutcomeEnum.KO_RETRIABLE:
return "PAYMENT_KO_RETRIABLE";
case WalletPaymentOutcomeEnum.ORDER_NOT_PRESENT:
return "PAYMENT_ORDER_NOT_PRESENT";
case WalletPaymentOutcomeEnum.DUPLICATE_ORDER:
return "PAYMENT_DUPLICATE_ORDER";
default:
return outcome;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,14 @@ const WalletPaymentOutcomeScreen = () => {
),
action: closeFailureAction
};
case WalletPaymentOutcomeEnum.BE_NODE_KO:
return {
pictogram: "umbrellaNew",
title: I18n.t("wallet.payment.outcome.BE_NODE_KO.title"),
subtitle: I18n.t("wallet.payment.outcome.BE_NODE_KO.subtitle"),
action: closeFailureAction,
secondaryAction: contactSupportAction
};
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export enum WalletPaymentOutcomeEnum {
PAYPAL_REMOVED_ERROR = "19", // error while executing the payment with PayPal
PAYMENT_METHODS_NOT_AVAILABLE = "20", // payment methods not available
IN_APP_BROWSER_CLOSED_BY_USER = "24", // in-app browser closed by user (24 because from 19 to 23 are already used by backend)
BE_NODE_KO = "99", // Backend error when the node service is down
INSUFFICIENT_AVAILABILITY_ERROR = "116", // insufficient availability
CVV_ERROR = "117", // CVV error
PLAFOND_LIMIT_ERROR = "121" // plafond limit error
Expand Down
Loading