Closed josebyte closed 4 years ago
You need to pass the key in an object:
StripePlugin.setPublishableKey({ key: 'your key here' })
Thanks! I take it from the usage example:
INITIALIZING THE PLUGIN
import { Plugins } from '@capacitor/core';
const { Stripe } = Plugins;
...
await Stripe.setPublishableKey('pk_test_....');
If you want maybe I can help you with the documentation.
I get "you must provide a valid key" error in the setPlubishableKey catch. I'm using "capacitor-stripe": "^0.4.0" and my code:
ngOnInit() { this.setPublishKey(); }
async setPublishKey() { await StripePlugin.setPublishableKey('pk_test_XFbXPA2KAKbhaMOllskUKEzx00A3eqpr8y').then((message) => { console.log(message); }).catch((error) => { console.log(error); }); }
What should I do?