How to use the expo-payments-stripe.PaymentsStripe.canMakeApplePayPaymentsAsync function in expo-payments-stripe

To help you get started, we’ve selected a few expo-payments-stripe examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github expo / expo / packages / expo-payments-stripe / examples / without-expokit / src / ApplePay.js View on Github external
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'],
    });
    this.setState({
      allowed,
      amexAvailable,
      discoverAvailable,
      masterCardAvailable,