-
Notifications
You must be signed in to change notification settings - Fork 62
Description
PayPal Android SDK Version
1.7.0
Environment
Sandbox
Android Version & Device
Nexus 6 API 34 Emulator
PayPal dependencies
1.7.0 official demo project dependencies
Describe the bug
I am testing official 1.7.0 Demo application and there is a bug with PayPalWebCheckoutClient
. In a specific scenario, when you cancel the payment flow (by closing the webview) it will not inform the app about the cancellation (PayPalWebCheckoutListener#onPayPalWebCanceled
). Please check the steps for reproduction.
I noticed that you are using an old version of Browser Switch dependency 2.3.1 so it is possible that migrating to a later version could possibly fix this bug.
Possible bug in Browser Switch library?:
I noticed in BrowserSwichClient
is this logic which resets intent in case when the payment was successful:
And here is the probematic condition when intent
is actually null
(when you do first successful payment and then do the same but instead of checkout you cancel the webview) .

To reproduce
- Open official Demo app
- Open PayPal Web -> Authorize -> Create order -> PAYPAL -> Start checkout
- Do the payment. After that you will see correct state CHECKOUT COMPLETE
- Return back to main screen in Demo app.
- Repeat step 2.
- Don't do the payment, just press "X" to cancel the payment WebView.
- BUG: You will not receive
onPayPalWebCanceled(...)
in this scenario. Demo app is stuck in infinite loading state. See picture below:

Expected behavior
PayPal SDK must correctly trigger onPayPalWebCanceled(...)
in all scenarios.
Screenshots
No response