-
Notifications
You must be signed in to change notification settings - Fork 658
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
Refactor session complete payment #1067
Conversation
@@ -315,7 +318,7 @@ private void processPaymentIntent(@NonNull PaymentIntent paymentIntent) { | |||
confirmPaymentIntent(Objects.requireNonNull(paymentIntent.getId())); | |||
return; | |||
} | |||
|
|||
mPaymentSession.onCompleted(); |
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.
Are there states the PaymentIntent can be in where we shouldn't call onCompleted? In other words, should we only do this if PaymentIntent's status is succeeded? Also, should we move this call into finishPayment()
?
build.gradle
Outdated
@@ -18,6 +18,7 @@ allprojects { | |||
repositories { | |||
google() | |||
jcenter() | |||
mavenLocal() |
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.
revert
@@ -26,7 +26,7 @@ | |||
* You can get your key here: https://dashboard.stripe.com/account/apikeys | |||
*/ | |||
private static final String PUBLISHABLE_KEY = | |||
"put your key here"; | |||
"pk_test_pWjWlOKXD13QQ1o31awb0IM000u9Xq3Hxd"; |
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.
revert
@@ -19,7 +19,7 @@ | |||
|
|||
// Put your Base URL here. Unless you customized it, the URL will be something like | |||
// https://hidden-beach-12345.herokuapp.com/ | |||
private static final String BASE_URL = "put your url here"; | |||
private static final String BASE_URL = "https://jemerick-stripe-3ds2.herokuapp.com/"; |
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.
revert
@@ -19,7 +19,7 @@ | |||
|
|||
// Put your Base URL here. Unless you customized it, the URL will be something like | |||
// https://hidden-beach-12345.herokuapp.com/ | |||
private static final String BASE_URL = "put your base url here"; | |||
private static final String BASE_URL = "https://jemerick-stripe-3ds2.herokuapp.com/"; |
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.
revert
@@ -40,7 +40,7 @@ | |||
* You can get your key here: https://dashboard.stripe.com/account/apikeys | |||
*/ | |||
private static final String PUBLISHABLE_KEY = | |||
"put your publishable key here"; | |||
"pk_test_pWjWlOKXD13QQ1o31awb0IM000u9Xq3Hxd"; |
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.
revert
*/ | ||
public void completePayment(@NonNull PaymentCompletionProvider provider) { |
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.
I wonder if we still need to call onPaymentSessionDataChanged()
? Probably not because this is not an async task, but worth calling out.
This reverts commit 4517aa9.
Summary
Removed payment completion provider and payment result listener.
Also fixed a few bugs with the totals in the sample store app.
Motivation
MOBILE3DS2-382
Confusion around the usage of paymentSession.completePayment.
Testing
Automated tests, sample store app.