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/33.0.0.0 Mobile Safari/537.36 [FB_IAB/FB4A;FBAV/28.0.0.20.16;]"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With