4

I'm building a web app with Stripe checkout. On desktop it loads a nice modal when you go to pay, but on mobile it brings the users off to a Stripe page, and then back. I want it to look like the user is never leaving our site.

Is there a way to force the modal to be loaded on mobile? I'm building the web app in ionic at the same time, so if I want to turn it in to an app I can. Ionic uses a WebView on the phone and that loads the modal fine, so there must be some setting that is allowing it?

Anyone have any ideas? Thanks.

edit If I 'request desktop site' on my mobile it loads the modal fine

user1180888
  • 497
  • 1
  • 10
  • 29
  • There isn't a way to do this. On mobile, Stripe Checkout will always open in a new tab and you can't open it as a modal/popup – koopajah May 25 '16 at 14:28
  • Is a WebView not just a browser without the address bar? Seems strange that it works in the webview. Pretty annoying! Thanks for your answer @koopajah – user1180888 May 25 '16 at 15:00
  • Well not really, at least it's a limited browser that isn't as easy to work with/detect/etc. – koopajah May 25 '16 at 20:27

1 Answers1

0

As Stripe makes these determinations based on the User-Agent you could try changing the User-Agent of your webview to match that of a desktop browser, (I did a similar thing except I needed to force mobile behavior in the desktop).

It should be stated, that this is definitely not recommended by Stripe nor supported and could break at any time. They'd recommend you just build a custom form using Stripe.js

How i can set User Agent in Cordova App has how to set the User-Agent in iOS and Android.

Community
  • 1
  • 1
Matthew Arkin
  • 4,460
  • 2
  • 27
  • 28