How to use expo-payments-stripe - 10 common examples

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 / src / DangerZone.ts View on Github external
get Stripe() {
    deprecatedModule(
      `DangerZone.Stripe -> import { PaymentsStripe } from 'expo-payments-stripe'`,
      'DangerZone.Stripe',
      'expo-payments-stripe'
    );
    return require('expo-payments-stripe').PaymentsStripe;
  },
  get DeviceMotion() {
github Marwan01 / food-converter / node_modules / expo / build / DangerZone.js View on Github external
get Stripe() {
        deprecatedModule(`DangerZone.Stripe -> import { PaymentsStripe } from 'expo-payments-stripe'`, 'DangerZone.Stripe', 'expo-payments-stripe');
        return require('expo-payments-stripe').PaymentsStripe;
    },
    get DeviceMotion() {
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'],
github expo / expo / packages / expo-payments-stripe / examples / with-expokit / src / BySourceScreen.js View on Github external
componentWillMount() {
    Stripe.setOptionsAsync({
      publishableKey: 'pk_test_M315xbWEvSQjt7B8ZJYzuipC',
      androidPayMode: 'test',
    });
  }
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,
github expo / expo / packages / expo-payments-stripe / examples / without-expokit / src / ApplePay.js View on Github external
id: 'fedex',
              label: 'FedEX',
              detail: 'Test @ 10',
              amount: '1.00',
            },
          ],
        }
      );

      this.setState({ loading: false, token });

      if (this.state.complete) {
        await Stripe.completeApplePayRequestAsync();
        this.setState({ status: 'Apple Pay payment completed' });
      } else {
        await Stripe.cancelApplePayRequestAsync();
        this.setState({ status: 'Apple Pay payment cenceled' });
      }
    } catch (error) {
      this.setState({ loading: false, status: `Error: ${error.message}` });
    }
  };
github expo / expo / packages / expo-payments-stripe / examples / without-expokit / src / ApplePay.js View on Github external
//requiredShippingAddressFields: ['all'],
          shippingMethods: [
            {
              id: 'fedex',
              label: 'FedEX',
              detail: 'Test @ 10',
              amount: '1.00',
            },
          ],
        }
      );

      this.setState({ loading: false, token });

      if (this.state.complete) {
        await Stripe.completeApplePayRequestAsync();
        this.setState({ status: 'Apple Pay payment completed' });
      } else {
        await Stripe.cancelApplePayRequestAsync();
        this.setState({ status: 'Apple Pay payment cenceled' });
      }
    } catch (error) {
      this.setState({ loading: false, status: `Error: ${error.message}` });
    }
  };
github expo / expo / packages / expo-payments-stripe / examples / with-expokit / src / BySourceScreen.js View on Github external
handleCreateSourcePress = async () => {
    try {
      this.setState({ loading: true, source: null });

      const source = await Stripe.createSourceWithParamsAsync({
        type: 'alipay',
        amount: 50,
        currency: 'EUR',
        returnURL: Linking.makeUrl('source'),
      });
      this.setState({ loading: false, source });
    } catch (error) {
      this.setState({ loading: false });
    }
  };
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,