-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
[android] EphemeralKeyProvider called 4 times #135
Comments
Thanks I'll check it out soon 😄 |
* Fixe payment result handler * Fixe getting top view controller * fixe android #135 Co-authored-by: Kefah BADER <[email protected]>
Hi @triniwiz This issue still on android even with the latest change to add Now why still did 2 call I don't know but it is most likely from the Stripe SDK! I did explain this in new issue at the repo of Stripe android SDK The problem is with all those call Now |
I was wondering if we can change StripeStandardCustomerSession to private and call it internally directly from here. This issue come mainly from the 'createKeyProvider` because it is asynchrone, all the initialisations begin before the return of the ephemeral object .. but not only, we should ensure a synchronous calls on the initialisations. |
Hi @triniwiz @NathanWalker
Sorry for reporting 3 separated issues but I discover then as i go!
I've seen 4 call to get the Ephemeral key! the problem come from
com.stripe.android.CustomerSession.initCustomerSession
that accept a 3rd attribute to avoid sending other request whenPaymentSession
is initialized. see hereWe can expose an attribute at the constructor as below but strangely enough setting shouldPrefetchCustomer to false this does prevent the prefetech call but doesn't resolve the problem !! I'll investigate that more, I yhink the problem come from the
PaymentSession
!Also
Application.android.context
is deprecated forUtils.android.getApplicationContext()
The text was updated successfully, but these errors were encountered: