You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I call initialize once, and then can proceed to call presentDropInPaymentUI one time, but if I try a second time I get an error "The Braintree client must first be initialized via BraintreePlugin.initialize(token)"
I have verified that with current code, to do two payments you must initialize EACH time with a DIFFERENT client token.
This change is caused by commit 5c6f9c4 on 4/22/18 where the initialization and presentPaymentUI methods where modified. Previously initialize set the token and created a DropInUI request. Currently presentPaymentUI creates a new request each time it is called.
Personally I prefer the original behavior because I only have to request one client token and can re-use it (for 24 hours until it expires). But perhaps the new method is safer.
dvcroft
changed the title
initialize invalidated after one use
initialize must be called with a new client token before every call to presentDropInPaymentUI, this is a change (android)
May 15, 2020
I call initialize once, and then can proceed to call presentDropInPaymentUI one time, but if I try a second time I get an error "The Braintree client must first be initialized via BraintreePlugin.initialize(token)"
Previously I was using https://github.com/taracque/cordova-plugin-braintree.git On that version, I could do one initialize, and multiple presentDropInPaymentUI.
Is the single use behavior on this fork intentional?
I am using a client token which the braintree docs say is good for 24 hours.
Thanks,
Darren
The text was updated successfully, but these errors were encountered: