I’m trying to implement Stripe checkout in my app. It works fine in a web browser, but I’m having a little bit of trouble with the Android app.
Here’s the workflow:
- I redirect the user to the Stripe checkout page (not hosted on my server). I pass a redirect URL to Stripe.
- Once the payment is complete or canceled, Stripe redirects back to my site with the URL I passed to them.
There’s no problem on the web browser, but on the mobile app the redirect wasn’t working. To make the redirect to Stripe work, I had to add this line to my mobile-config.js
file:
App.accessRule('https://checkout.stripe.com/*', { type: 'navigation' });
OK, so then the redirect to stripe worked back, but then the redirect back to my site didn’t work, so I added this line to allow redirecting back to my site:
App.accessRule('https://www.dong-chinese.com/*', { type: 'navigation' });
It does go to my site, but it seems like it’s opening the URL in an embedded browser separate from the app. It acts as if the user started a fresh session in a web browser (the user is logged out and Meteor.isCordova()
is false).
Is there any way to make the redirect go back to the app?