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
Hi,
We have a feedback from one of our testers that the authorization in paypal webpage using Chrome CustomTabs cancels once he clicks the "minimize" button on the CustomTabs toolbar.
We analyze the log and find Braintree returns "UserCanceledException: User canceled PayPal" from onPayPalFailure method.
To reproduce
Install Chrome of which version at least 122 on the phone, and set it as the CustomTabs provider.
Choose PayPal as the payment method and checkout (i.e. invoke PayPalClient.tokenizePayPalAccount method).
Some users can see screen like this below:
On the right of close button, there is a down arrow. Click it and the customTabs will be minimized, after that onPayPalFailure is called.
If you can't see the minimize button on CustomTabs toolbar, make sure the brand of the test phone is NOT Xiaomi. And if you still can't see the button, open chrome and open uri: chrome://flags/#cct-minimized, set the flag to ENABLED and check again.
Expected behavior
We don't wanna receive this UserCanceledException when minimize the customTabs. We hope the calling process can be waiting while the customTabs is minimized and receive token result after customTabs is truly cancelled.
Also we did some analysis of the code logic, we think the minimization feature enabled by Chrome is the reason (may be wrong :) ), according to this doc about the overview of Android customTabs: https://developer.chrome.com/docs/android/custom-tabs. This feature is based on Picture-in-Picture in Android system. Once the customTabs is minimized, the checkout page would be resumed, and the PayPalLifecycleObserver would get ON_RESUME lifecycle event, which triggers the SDK flow.
Have a nice day~ :)
Screenshots
No response
The text was updated successfully, but these errors were encountered:
Hi @LAMESGIT - We just released the GA version of v5! In this version, the interface has been updated to give the additional browser switch flexibility.
For the case where the user minimizes the Chrome Custom Tab and returns to the app, the callback will return NoResult. You can then handle this however you need. The buyer can still return to the Chrome Custom Tab to complete the payment flow.
Please give v5 a try and let us know if you run into any issues!
Hi @LAMESGIT - We just released the GA version of v5! In this version, the interface has been updated to give the additional browser switch flexibility.
For the case where the user minimizes the Chrome Custom Tab and returns to the app, the callback will return NoResult. You can then handle this however you need. The buyer can still return to the Chrome Custom Tab to complete the payment flow.
Please give v5 a try and let us know if you run into any issues!
Braintree SDK Version
4.33.0
Environment
Both
Android Version & Device
Google Pixel 4 - Android 13.0
Braintree dependencies
implementation 'com.braintreepayments.api:paypal:4.33.0'
Describe the bug
Hi,
We have a feedback from one of our testers that the authorization in paypal webpage using Chrome CustomTabs cancels once he clicks the "minimize" button on the CustomTabs toolbar.
We analyze the log and find Braintree returns "UserCanceledException: User canceled PayPal" from
onPayPalFailure
method.To reproduce
onPayPalFailure
is called.If you can't see the minimize button on CustomTabs toolbar, make sure the brand of the test phone is NOT Xiaomi. And if you still can't see the button, open chrome and open uri: chrome://flags/#cct-minimized, set the flag to ENABLED and check again.
Expected behavior
We don't wanna receive this UserCanceledException when minimize the customTabs. We hope the calling process can be waiting while the customTabs is minimized and receive token result after customTabs is truly cancelled.
Also we did some analysis of the code logic, we think the minimization feature enabled by Chrome is the reason (may be wrong :) ), according to this doc about the overview of Android customTabs: https://developer.chrome.com/docs/android/custom-tabs. This feature is based on Picture-in-Picture in Android system. Once the customTabs is minimized, the checkout page would be resumed, and the PayPalLifecycleObserver would get ON_RESUME lifecycle event, which triggers the SDK flow.
Have a nice day~ :)
Screenshots
No response
The text was updated successfully, but these errors were encountered: