-
Notifications
You must be signed in to change notification settings - Fork 106
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
feat(Bonus Pagamenti Digitali): [#175683801] When credit card has been added, join BPD or enroll the new method to BPD #2399
feat(Bonus Pagamenti Digitali): [#175683801] When credit card has been added, join BPD or enroll the new method to BPD #2399
Conversation
when new credit card has been added navigate to join bpd / enroll the new method on bpd
Affected stories
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On final note, when adding a new credit card the confirmation message that was displayed when returning to the wallet is no longer present.
const ActivateBpdOnNewBancomatScreen: React.FunctionComponent<Props> = props => { | ||
const ActivateBpdOnNewPaymentMethodScreen: React.FunctionComponent<Props> = props => { | ||
const { headerTitle, title, body1, body2, skip, continueStr } = loadLocales(); | ||
// show new added methods from navigation params | ||
// if they aren't, read the new bancomat added from the store | ||
const newMethodsAdded = | ||
props.navigation.getParam("newAddedMethods") ?? props.newBancomat; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to be ready for the next payments methods, would be nice to transform ActivateBpdOnNewBancomatScreen
-> ActivateBpdOnNewPaymentMethodScreen
, a component that accepts as props: paymentMethods: ReadonlyArray<PatchedWalletV2>
and than add:
const ActivateBpdOnNewBancomatScreen: React.FunctionComponent<Props> = props => (
<ActivateBpdOnNewPaymentMethodScreen paymentMethods={props.newBancomat} />
);
const mapStateToProps = (state: GlobalState) => ({
newBancomat: onboardingBancomatAddedPansSelector(state)
});
const ActivateBpdOnNewCreditCardScreen: React.FunctionComponent<Props> = props => (
<ActivateBpdOnNewPaymentMethodScreen paymentMethods={props.navigation.getParam("newAddedMethods")} />
);
In this way we can reuse the ActivateBpdOnNewPaymentMethodScreen
also for future payments type that can be read from store or from navigation props.
What you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update within b40f05a
ts/sagas/wallet.ts
Outdated
// remove these screen from the navigation stack: method choice, credit card form, credit card resume | ||
yield put(navigationHistoryPop(3)); | ||
return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could be a problem because we have a story that ask us to add a credit card without the method choice https://www.pivotaltracker.com/story/show/175757212
We could accept this implementation but we should freeze the credit card onboarding workflow and reject this request.
Codecov Report
@@ Coverage Diff @@
## master #2399 +/- ##
=========================================
Coverage ? 50.11%
=========================================
Files ? 658
Lines ? 18521
Branches ? 3614
=========================================
Hits ? 9282
Misses ? 9191
Partials ? 48
Continue to review full report at Codecov.
|
Short description
When a new credit card has been successfully added, this PR adds the ability to join BPD or enroll the new payment method added.
!isNewMethodBpdCompliant
isNewMethodBpdCompliant && !bpdActivationStatus
isNewMethodBpdCompliant && bpdActivationStatus