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

Fetch previously used PaymentMethod in PaymentSession #2179

Merged
merged 1 commit into from
Feb 14, 2020

Conversation

mshafrir-stripe
Copy link
Collaborator

Summary

When a customer starts a new PaymentSession, if they
have previously selected a payment method (determined
via PaymentSessionPrefs), fetch the full PaymentMethod
object from the API and update the PaymentSessionData.

This behavior will only be triggered when
PaymentSessionConfig.shouldPrefetchCustomer == true.

Motivation

Fixes #1977

Testing

  • Add unit tests
  • Manually verify

Customer selects a payment method, leaves the PaymentSession, then starts a new PaymentSession. The UI is updated with the previously selected payment method.

persisted

Summary
When a customer starts a new `PaymentSession`, if they
have previously selected a payment method (determined
via `PaymentSessionPrefs`), fetch the full `PaymentMethod`
object from the API and update the `PaymentSessionData`.

This behavior will only be triggered when
`PaymentSessionConfig.shouldPrefetchCustomer == true`.

Motivation
Fixes #1977

Testing
- Add unit tests
- Manually verify
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Get default payment method on the UI side
4 participants