I am working on android application. The server on which I am working gives the subscription feature to the users, so users need to do payment to become a member on the website.
Now I am working on the same in android app and using webview to perform the payment gateways. I am loading the url of stripe checkout payment in the webview.
But I am getting the below error for Stripe checkout in webview.
Sorry, there was a problem loading Checkout. If this persists, please try a different browser.
How can I resolve this issue in the webview, so that it can work in my application?
Stripe checkout indeed does not work on Android WebViews, but it does work on iOS UIWebView…
So… UserAgent comes to rescue!
webView.getSettings().setUserAgentString("Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X) AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0 Mobile/13E233 Safari/601.1");
I have added this to the userAgent of the webview and it worked.
"Mozilla/5.0 (Linux; Android 4.4.4; One Build/KTU84L.H4) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/126.96.36.199 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/188.8.131.52.16;]"
you problem is not with android device or android application, you have problem in your payment integration system.
if you are using Pay Now “Default popup for payment from stripe” it will surely occur an error. You need to integrate its payment system with your’s own code by using AJAX token system.
We also got the
"Sorry, there was a problem loading the Checkout. If this persists, please try a different browser." error in WebView on Android (in React Native App)
<meta name="mobile-web-app-capable" content="yes"> the problem was solved for us. Now Stripe loads as on IOS.