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've identified what appears to be a bug in the Braintree Android SDK. It looks like BraintreeFragment#postCancelCallback is called multiple times after the PayPal activity is canceled by the user.
This means that any BraintreeCancelListener that is registered with the BraintreeFragment will receive the BraintreeCancelListener#onCancel callback twice.
If BraintreeFragment#removeListener is is invoked as part of the first onCancel callback, the second cancel event is queued. When BraintreeFragment#addListener is called, the queued event is flushed and BraintreeCancelListener#onCancel is invoked immediately.
Because of this issue, a user may successfully authorize a PayPal future payment, but an app will track it as a cancellation instead. The PayPal payment nonce is never uploaded to our server.
STEPS TO REPRODUCE
ensure paypal app is not installed on the phone
from a client app activity, call PayPal#authorizeAccount(braintreeFragment), which triggers the browser switcher
press the back button to return to the client app activity
I've identified what appears to be a bug in the Braintree Android SDK. It looks like BraintreeFragment#postCancelCallback is called multiple times after the PayPal activity is canceled by the user.
This means that any
BraintreeCancelListener
that is registered with the BraintreeFragment will receive theBraintreeCancelListener#onCancel
callback twice.If
BraintreeFragment#removeListener
is is invoked as part of the first onCancel callback, the second cancel event is queued. WhenBraintreeFragment#addListener
is called, the queued event is flushed andBraintreeCancelListener#onCancel
is invoked immediately.Because of this issue, a user may successfully authorize a PayPal future payment, but an app will track it as a cancellation instead. The PayPal payment nonce is never uploaded to our server.
STEPS TO REPRODUCE
NOTES
braintree_android/Braintree/src/main/java/com/braintreepayments/api/PayPal.java
Line 399 in 4e5c024
braintree_android/Braintree/src/main/java/com/braintreepayments/api/BraintreeFragment.java
Line 296 in ae956ca
The text was updated successfully, but these errors were encountered: