PayPal integration in Android WebView not working
See original GitHub issueGeneral information
- SDK version: Javascript SDK, version 3.52.1
- Environment: Production
- Browser and OS: WebView (Chrome 77.0.3865.73), Android 9
Issue description
We use the Braintree JavaScript SDK for our PayPal checkout. The checkout is used on our site, as well as rendered from within our mobile apps. Everything works fine, except for the WebView in the Android app.
Here’s a step-by-step:
- Initiate the PayPal flow. This is done by calling
tokenize
on an PayPal instance that we created usingbraintree.paypal.create({...})
- A PayPal log in screen is rendered where only e-mail address can be entered. We enter a valid e-mail address.
- Next screen rendered is one where PayPal prompts for a password. We enter the correct password.
- We are redirected to another PayPal login screen, this time with both e-mail address and password. The same credentials are entered again.
- We are redirected to a PayPal page with a reCAPTCHA
- After completing the reCAPTCHA challenge, we arrive at a “pay with credit card” page with a button to “Agree & Continue”.
- When clicking the “Agree & Continue” button, a spinner with “Processing” appears, and when it disappears we are left with a blank white page.
When trying the same checkout on a browser on the same device, we are prompted with only one login flow (the one where email address and password in rendered together). This time, no reCAPTCHA challenge. After pressing “Agree & Continue”, we return to our checkout.
Any ideas why this is?
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Paypal payment page layout broken in webview android
I am facing a strange issue on some android devices, I am opening the paypal payment page on webview and it's layout get...
Read more >Paypal Payment Page Layout Broken In Webview ... - ADocLib
PayPal integration in Android WebView not working #459. Closed When clicking the "Agree & Continue" button, a spinner with that your current setup...
Read more >Braintree.js Client Reference v3.1.0
Webviews on iOS and Android are supported for all integrations except PayPal. PayPal is not supported in any webview for security reasons.
Read more >PayPal security guidelines and best practices
To help keep your integration safe from current and future security threats, we recommend that you follow the best practices outlined below.
Read more >PayPal Native Checkout SDK for iOS and Android - Medium
However, for the checkout experience, PayPal best practices discourage the use of WebViews. This is to ensure the applications you develop ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello. To help us get a better understanding of your integration, are you using the pop-up bridge? Since by default WebViews cannot open pop-ups, which is what the PayPal flow relies on, we offer this pop-up bridge as a solution for integrations embedded in a WebView. If you are not using the pop-up bridge, we can’t guarantee that your current setup will work, as a PayPal checkout does not officially support WebViews.
@ZoltanSzokodi please reach out to our support team about this: https://help.braintreepayments.com/