Skip to content

Commit

Permalink
chore: [IOBP-981,IOBP-1002] Add PSP_ERROR outcome screen into payment…
Browse files Browse the repository at this point in the history
… flow (#6461)

## Short description
This PR adds the PSP_ERROR screen inside the payment outcome flow.

## List of changes proposed in this pull request
- Mapped the `PSP_ERROR` outcome as value `25`;
- Mapped the `PSP_ERROR` to mixpanel analytics;
- Mapped the outcome `BE_NODE_KO` as `PAYMENT_99_ERROR` to mixpanel
analytics;

## How to test
- Start a payment flow with the dev-server started;
- When you reach the final screen that opens inside the in-app browser,
choose from the dropdown the `PSP_ERROR` value;
- Check that the expected screen is the same [as designed
here](https://www.figma.com/design/OwkkVcUF05ZAfNkOp51Wwo/Flusso-di-Pagamento---Tracking-Strategy?node-id=1190-10188&t=Qdl1N46kVd5YdgW5-4)

## Preview


https://github.com/user-attachments/assets/e5ab3737-01f4-4347-be77-cbffcaeec073
  • Loading branch information
Hantex9 authored Nov 27, 2024
1 parent 83ae221 commit e8aa56b
Show file tree
Hide file tree
Showing 6 changed files with 2,228 additions and 9 deletions.
3 changes: 3 additions & 0 deletions locales/en/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1991,6 +1991,9 @@ wallet:
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.
PSP_ERROR:
title: Il pagamento non è andato a buon fine
subtitle: "Non è stato addebitato alcun importo.\nSe il problema persiste, prova a usare un altro metodo o gestore del pagamento."
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 @@ -1991,6 +1991,9 @@ wallet:
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.
PSP_ERROR:
title: Il pagamento non è andato a buon fine
subtitle: "Non è stato addebitato alcun importo.\nSe il problema persiste, prova a usare un altro metodo o gestore del pagamento."
support:
button: "Contatta l'assistenza"
supportTitle: Contatta l'assistenza
Expand Down
4 changes: 3 additions & 1 deletion ts/features/payments/checkout/analytics/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export const getPaymentAnalyticsEventFromFailureOutcome = (
case WalletPaymentOutcomeEnum.PAYPAL_REMOVED_ERROR:
return "PAYMENT_METHOD_AUTHORIZATION_ERROR";
case WalletPaymentOutcomeEnum.BE_NODE_KO:
return "PAYMENT_SLOWDOWN_ERROR";
return "PAYMENT_99_ERROR";
case WalletPaymentOutcomeEnum.INSUFFICIENT_AVAILABILITY_ERROR:
return "PAYMENT_INSUFFICIENT_AVAILABILITY_ERROR";
case WalletPaymentOutcomeEnum.CVV_ERROR:
Expand All @@ -83,6 +83,8 @@ export const getPaymentAnalyticsEventFromFailureOutcome = (
return "PAYMENT_ORDER_NOT_PRESENT";
case WalletPaymentOutcomeEnum.DUPLICATE_ORDER:
return "PAYMENT_DUPLICATE_ORDER";
case WalletPaymentOutcomeEnum.PSP_ERROR:
return "PAYMENT_PSP_ERROR";
default:
return outcome;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,14 @@ const WalletPaymentOutcomeScreen = () => {
action: closeFailureAction,
secondaryAction: contactSupportAction
};
case WalletPaymentOutcomeEnum.PSP_ERROR:
return {
pictogram: "attention",
title: I18n.t("wallet.payment.outcome.PSP_ERROR.title"),
subtitle: I18n.t("wallet.payment.outcome.PSP_ERROR.subtitle"),
action: closeFailureAction,
secondaryAction: contactSupportAction
};
}
};

Expand Down
Loading

0 comments on commit e8aa56b

Please sign in to comment.