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

Add shouldPrefetchEphemeralKey arg to CustomerSession.initCustomerSession() #1376

Merged
merged 1 commit into from
Aug 14, 2019

Conversation

mshafrir-stripe
Copy link
Collaborator

Summary

If shouldPrefetchEphemeralKey is true, an ephemeral key will be fetched immediately in EphemeralKeyManager. Otherwise, only fetch an ephemeral key when needed.

Default true to maintain existing behavior.

Motivation

Fixes #797

Testing

Added unit tests + manually verified

…sion()

If true, an ephemeral key will be fetched immediately. Otherwise, only
fetch an ephemeral key when needed.

Defaults to true to maintain existing behavior.

Fixes #797
assertFalse(paymentSession.handlePaymentData(PaymentSession.PAYMENT_METHOD_REQUEST,
RESULT_CANCELED, new Intent()));
verify(mCustomerSession).retrieveCurrentCustomer(
ArgumentMatchers.<CustomerSession.CustomerRetrievalListener>any());
}

@NonNull
private PaymentSession createPaymentSesson() {
Copy link
Contributor

Choose a reason for hiding this comment

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

haha sesson

@mshafrir-stripe mshafrir-stripe merged commit 6247b7a into master Aug 14, 2019
@mshafrir-stripe mshafrir-stripe deleted the prefetch-eph-key branch August 14, 2019 22:16
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.

EphemeralKeyProvider Called Twice
4 participants