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

Improve PaymentMethodCreateParams.Card creation #862

Merged
merged 1 commit into from Apr 10, 2019

Conversation

mshafrir-stripe
Copy link
Collaborator

Summary

When creating a PaymentMethod with a card, the card object
can either be created from the user's card details (e.g. card
number, CVC, expiration), or via a Stripe token (e.g. Google
Pay). PaymentMethodCreateParams.Card.Builder's setters made
it confusing to the developer that there were two separate
approaches to creating a PaymentMethodCreateParams.Card.

With this change, the Builder will be used when creating with
card details, and PaymentMethodCreateParams.Card#create will
be used when creating with a Stripe token.

Motivation

ANDROID-346

Testing

Updated tests

When creating a `PaymentMethod` with a card, the card object
can either be created from the user's card details (e.g. card
number, CVC, expiration), or via a Stripe token (e.g. Google
Pay). `PaymentMethodCreateParams.Card.Builder`'s setters made
it confusing to the developer that there were two separate
approaches to creating a `PaymentMethodCreateParams.Card`.

With this chamge, the Builder will be used when creating with
card details, and `PaymentMethodCreateParams.Card#create` will
be used when creating with a Stripe token.

ANDROID-346
@mshafrir-stripe mshafrir-stripe merged commit 6d5daac into master Apr 10, 2019
@mshafrir-stripe mshafrir-stripe deleted the paymentmethod-card branch April 10, 2019 19:02
@jemerick-stripe jemerick-stripe mentioned this pull request Apr 12, 2019
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.

None yet

3 participants