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

fix: save new payment method flow #130

Merged
merged 1 commit into from
Nov 26, 2024
Merged

Conversation

Shivam25092001
Copy link
Contributor

@Shivam25092001 Shivam25092001 commented Oct 30, 2024

SCREEN RECORDING

This video depicts:

  1. Delete a saved payment method.
  2. Save a new payment method using "$0 payment" flow.
  3. Use the saved payment method to process the payment.
Screen.Recording.2024-11-25.at.7.07.50.PM.mov

ADDED

  • native callback for handling clicks on Add new payment method.

FIXED

  • UI fix to display "Add pm button" in case of no saved-pms.
Before After

@Shivam25092001 Shivam25092001 changed the base branch from main to fix-pmm-onaddButtonClick October 30, 2024 06:24
Copy link
Collaborator

@25harsh 25harsh left a 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

@Shivam25092001 Shivam25092001 force-pushed the fix-pmm-onaddButtonClick branch from 7fb9887 to bd49749 Compare October 30, 2024 18:02
~body: PaymentMethodListType.redirectType
) => {
let paymentMethodId =
String.split(nativeProp.clientSecret, "_secret_")->Array.get(0)->Option.getOr("")
Copy link
Collaborator

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

Copy link
Contributor Author

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?

Copy link
Collaborator

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

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done 👍

@Shivam25092001 Shivam25092001 changed the base branch from fix-pmm-onaddButtonClick to main November 5, 2024 06:47
@25harsh 25harsh force-pushed the main branch 2 times, most recently from 3988dd0 to 3230e5e Compare November 20, 2024 09:06
@aashu331998 aashu331998 merged commit d62cab9 into main Nov 26, 2024
3 checks passed
@aashu331998 aashu331998 deleted the fix-pmm-save-pm-action branch November 26, 2024 08:30
manideepk90 pushed a commit that referenced this pull request Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants