zyra / cordova-plugin-stripe

A Cordova plugin that lets you use Stripe's Native SDKs for Android and iOS.
MIT License
93 stars 57 forks source link

Got the following issue "cordova_not_available" #21

Closed miguelfoko closed 7 years ago

miguelfoko commented 7 years ago

Can somebody help me please?

I got the 'cordova_not_available' issue when trying to use createCardToken method of stripe API.

I'm using the following tutorial https://github.com/zyra/cordova-plugin-stripe. My aim is to integrate Stripe in my Ionic Application. My IONIC Version is 3.3 and my cordova version is 6.2.3

Excuse me for my poor english

ihadeed commented 7 years ago

Are you trying this using ionic serve command?

The plugin only works on Cordova platforms.

miguelfoko commented 7 years ago

Hi ihadeed, Not sure to understand what you want to say, can you please more explain your suggestion?

ihadeed commented 7 years ago

How are you testing the app? Are you testing it while running ionic serve command? Or are you running it on a device?

The plugin will only work when running one of the following commands (or their Ionic equivalent):

cordova run/build browser
cordova run/build android
cordova run/build ios
miguelfoko commented 7 years ago

Hi @ihadeed. Thanks a lot for your answer, effectively I was running it using ionic serve, now that I tried to run on a device it works.

Thanks Thanks Thanks