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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

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
  3. Use the saved payment method to process the payment.
Screen.Recording.2024-10-30.at.11.44.23.AM.mov

ADDED

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

FIXED

  • Added flow to consume save-pm-api from payment sheet.

@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

~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
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