André Figueira

Systems engineer - I write apps, I make websites, opinions are my own...

Braintree Paypal keeps reseting after authentication

Recently, I've been dealing with Braintree a lot in a variety of different implementations and we came across an authentication issue which exposes a quirk in the way that the PayPal flow runs.

Specifically, if you want to pay via PayPal, and click the checkout on the Braintree dropin UI, if you make use of events to keep your dropin configuration up to date, and use updateConfiguration, this will reset the dropin ui, as this means that the value is now changed.

As per Braintree documentation;

If updateConfiguration is called after a user completes the PayPal authorization flow, any PayPal accounts not stored in the Vault record will be removed.

dropinInstance.updateConfiguration('paypal', 'amount', '10.00');

So be sure that you don't run the update unless the value has changed, Hope this helps someone.