-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: [IOBP-437] Add new wallet payment outcome error handling (#5390)
⚠️ Depends on #5378 ## Short description This PR adds the handling of the payment error outcomes. ## List of changes proposed in this pull request - Added components mapping based on the outcome in `WalletPaymentOutcomeScreen` - Added required locales keys - Refactored `usePaymentFailureSupportModal` to remove the requirement of passing `RptId` as its argument. ## How to test Within the **Profile > New Wallet > Payment** playground, using the `io-dev-api-server`, try to simulate different payment outcomes and check that the screen and its components are displayed correctly. ## Preview https://github.com/pagopa/io-app/assets/6160324/cb7c33f1-9c0d-471c-accf-a362efc42264 --------- Co-authored-by: Alessandro Izzo <[email protected]> Co-authored-by: Mario Perrotta <[email protected]>
- Loading branch information
1 parent
d6d2dc0
commit dff6e61
Showing
11 changed files
with
276 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
ts/features/walletV3/payment/components/WalletPaymentFeedbackBanner.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Banner, VSpacer } from "@pagopa/io-app-design-system"; | ||
import { openAuthenticationSession } from "@pagopa/io-react-native-login-utils"; | ||
import { default as React } from "react"; | ||
import { View } from "react-native"; | ||
import I18n from "../../../../i18n"; | ||
import { mixpanelTrack } from "../../../../mixpanel"; | ||
import { WALLET_PAYMENT_FEEDBACK_URL } from "../utils"; | ||
|
||
const WalletPaymentFeebackBanner = () => { | ||
const bannerViewRef = React.useRef<View>(null); | ||
|
||
const handleBannerPress = () => { | ||
void mixpanelTrack("VOC_USER_EXIT", { | ||
screen_name: "PAYMENT_OUTCOMECODE_MESSAGE" | ||
}); | ||
|
||
return openAuthenticationSession(WALLET_PAYMENT_FEEDBACK_URL, ""); | ||
}; | ||
|
||
return ( | ||
<> | ||
<VSpacer size={24} /> | ||
<Banner | ||
color="neutral" | ||
pictogramName="feedback" | ||
size="big" | ||
viewRef={bannerViewRef} | ||
title={I18n.t("wallet.outcomeMessage.payment.success.banner.title")} | ||
content={I18n.t("wallet.outcomeMessage.payment.success.banner.content")} | ||
action={I18n.t("wallet.outcomeMessage.payment.success.banner.action")} | ||
onPress={handleBannerPress} | ||
/> | ||
</> | ||
); | ||
}; | ||
|
||
export { WalletPaymentFeebackBanner }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.