triniwiz / nativescript-plugins

Apache License 2.0
78 stars 50 forks source link

Fix Android ephemeral key get called 3 times #6755 #186

Closed kefahB closed 7 months ago

kefahB commented 7 months ago

Hello @triniwiz,

I fixed the issue #135 6755 by forcing series of a sync operations :

  1. fetch of the ephemeral key first, then calling the EphemeralKeyProvider with the result directly, like that it will not try recall for more keys.

Users dont really need to initialize StripeStandardCustomerSession by them self, it is unnecessary step, I have moved this to StripeStandardPaymentSession where it will be initialized in a sync way, otherwise the listener parent.customerSession.native.retrieveCurrentCustomer will be undefined.

I tested those changes and seems it work as expected.

Hop you can push 9.0.0