Baadier-Sydow / ionic-stripe

Different ways to integrate Stripe into an Ionic Framework application
https://baadiersydow.com/integrate-ionic-framework-stripe-single-recurring-payments/
MIT License
11 stars 5 forks source link

Won’t work on production #2

Open noctivityinc opened 5 years ago

noctivityinc commented 5 years ago

Stripe elements requires https to server the page to use stripe.js. In development it’s fine but in production stripe.js won’t load. How do you handle this?

Baadier-Sydow commented 5 years ago

I haven't had any problems to date but I can review this on the weekend to see if there is something I've missed.

noctivityinc commented 5 years ago

Stripe does not allow you to serve their element or JS from a non-secure page, so we found that Stripe elements would not load in production on iOS devices.

Instead we are simply now hosting the credit card form on our server and using an I-frame with post messages to capture the credit card token and pass it back to the ionic app to proceed

On Tue, Feb 19, 2019 at 2:06 AM Baadier Sydow notifications@github.com wrote:

I haven't had any problems to date but I can review this on the weekend to see if there is something I've missed.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Baadier-Sydow/ionic-stripe/issues/2#issuecomment-465011579, or mute the thread https://github.com/notifications/unsubscribe-auth/AAE0Am1IPgt2ZL07FrAc34wIbRmslu-Oks5vO6JfgaJpZM4bBvz5 .

LHLK commented 5 years ago

Hello @noctivityinc could you please elaborate little more how to use the 'post message' getting the card token back from the I-frame? Thank you.

therealjmj commented 5 years ago

This is also an issue for me. The element does not load in production iOS. Error in console: "Live Stripe integrations must use HTTPS".