-
Notifications
You must be signed in to change notification settings - Fork 5
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
fix: save new payment method flow #130
base: main
Are you sure you want to change the base?
Conversation
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.
please remove the merge commits
7fb9887
to
bd49749
Compare
src/hooks/AllPaymentHooks.res
Outdated
~body: PaymentMethodListType.redirectType | ||
) => { | ||
let paymentMethodId = | ||
String.split(nativeProp.clientSecret, "_secret_")->Array.get(0)->Option.getOr("") |
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.
add this logic at top level while storing the clientsecret in the sdk types
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 payments flow, we extract the payment-id from client-secret in the hook itself.
As implemented here: useRedirectHook in AllPaymentHooks.res.
Also do we get any added advantage for extracting it at the top level?
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.
yes we have to extract at the top level because the logic may change "secret" also if someone uses the oss version if he makes any changes he don't have to look at multiple places, please create one more field in SDK types and while storing the client secret store the id as well
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.
done 👍
42ead09
to
62fe42c
Compare
SCREEN RECORDING
This video depicts:
Screen.Recording.2024-10-30.at.11.44.23.AM.mov
ADDED
Add new payment method
.FIXED