Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a browser platform support #5

Merged
merged 2 commits into from
Feb 12, 2017
Merged

Added a browser platform support #5

merged 2 commits into from
Feb 12, 2017

Conversation

klirix
Copy link

@klirix klirix commented Feb 12, 2017

No description provided.

@ihadeed
Copy link
Member

ihadeed commented Feb 12, 2017

Thanks @klirix

Looks great, and I like the idea of automatically injecting the stripe js, very convenient!

There are only styling issues with this PR, but I will fix that after merging. Just missing spacing and semi-colons.

@ihadeed ihadeed merged commit 0ce0528 into zyra:master Feb 12, 2017
@jacquesdev
Copy link

Hello - can someone please tell me how this works, because if Stripe.js gets injected automatically, I would expect to access a object called Stripe, since cordova.plugins.stripe.createCardToken would not work in the browser (cordova is undefined in the browser).

So please advise how I should be calling this in the browser because I am not sure how to do that, and I don't see Stripe?

@ihadeed
Copy link
Member

ihadeed commented Apr 13, 2017

@jacquesdev

It should show up if you run cordova run browser or cordova build browser.

I think this automatic injection feature should be removed, to avoid situations like this where you want to run the app in the browser without the Cordova Browser platform (e.g. ionic serve).

@jacquesdev
Copy link

jacquesdev commented Apr 13, 2017

Ah ok, I did not even realise there is an option like that. I am happy to leave it in - will try and run the app like this. Much easier for development testing

@mariohmol
Copy link

Hi there!! Awesome news about using in web as well.. is it possible to run as a normal html app or just works if i can via cordova run browser ?

Cause when i try to run in a express static for instance, I got this message Native: tried calling Stripe.setPublishableKey, but Cordova is not available. Make sure to include cordova.js or run in a device/simulator.

As this is running on web not using cordova.js at all a neither in a emulator (in a browser instead)

@ihadeed
Copy link
Member

ihadeed commented Jun 26, 2017

@mariohmol It only works via cordova run browser

Please open a new issue for any further questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants