This implementation has a syntax error on both of the Stripe.xxx calls: Cannot find name ‘Stripe’. Did you mean the instance member ‘this.Stripe’? (Ionic serve ignores the syntax error and allows for a successful payment to be made, however ionic build fails to build due to the syntax error)
However if I change it to this.Stripe.xxx then I get an error on the actual app when trying to process the payment: cannot read property setPublishableKey of undefined
Any suggestions to solve this issue are welcome although please note that we would rather not use the angular plugin at this stage.
Since the payment is processing. try declare var Stripe; above @component. This is usually a typescript error. its not able to access the Stripe module
Hi, I’m quite keen to find out how this has worked out.
Firstly, stripe.js should be served from a https site. In your case, it’s included in the ionic app. This worked ok for me with test payments and keys but once I started to use live payments, I start getting a warning even with ionic serve, saying it should use a secure connection.
I’ve managed to do it without plugins now too! I would have bought this if you had told me sooner haha! But just out of interest how did you format the strings for the card and expiry date? Did you use stripe elements? or did you implement your own formatting using angular?
just copy the link of strip below the cordova.js script tag i.e. in index.html of your project then whichever page you using strip just declare Stripe :any; then you can use Stripe without plugin of cordova plugin in ionic 2 platform.
Thanks for the solution using stripe plugin for payment integration. But could you tell me how to generate that publishable key. And can you share any git hub link to clone sample project using this stripe.
Yo, was anyone able to solve the HTTPS issue? My app works fine in test mode, but I get the “Live Stripe.js integrations must use HTTPS” error when I switch to live mode.
Hy, I have a stripe token. But I don’t know how to charge it. here is my code for charging the token:
When, I run this. I get the error with the name of: