1
votes

According to the docs this plugin supports 'Browser', but page hangs when get injected Stripe:

  1. installed @ionic-native/stripe
  2. imported

import { Stripe } from '@ionic-native/stripe';

  1. injected in constructor

constructor(private stripe: Stripe) {}

After actions above my page is not loading (and no error in console) via 'ionic serve'

2

2 Answers

2
votes

You cannot do this through ionic-native/stripe. It is a wrapper of native Cordova plugin. So you must use the device for testing.

Stripe doc says about the javascript API without a native plugin. It is working fine on web apps since no Cordova there.

Need to use this CLI:

ionic cordova run android --prod --device
1
votes

You need to add the browser platform before using it in the browser:

 ionic cordova platform add browser

And the to run it:

 ionic cordova platform run browser

It will not work with ionic-serve because then only the content of your www folder is served and all of cordova is missing.