Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async componentWillMount() {
await Stripe.setOptionsAsync({
publishableKey: 'pk_test_M315xbWEvSQjt7B8ZJYzuipC',
androidPayMode: 'test',
merchantId: 'merchant.host.exp.exponent',
});
const allowed = await Stripe.deviceSupportsApplePayAsync();
const amexAvailable = await Stripe.canMakeApplePayPaymentsAsync({
networks: ['american_express'],
});
const discoverAvailable = await Stripe.canMakeApplePayPaymentsAsync({
networks: ['discover'],
});
const masterCardAvailable = await Stripe.canMakeApplePayPaymentsAsync({
networks: ['master_card'],
});
const visaAvailable = await Stripe.canMakeApplePayPaymentsAsync({
networks: ['visa'],
componentWillMount() {
Stripe.setOptionsAsync({
publishableKey: 'pk_test_M315xbWEvSQjt7B8ZJYzuipC',
androidPayMode: 'test',
});
}