How to use the tipsi-stripe.createSourceWithParams function in tipsi-stripe

To help you get started, we’ve selected a few tipsi-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 tipsi / tipsi-stripe / example / src / scenes / SourceScreen.js View on Github external
handleCreacteSourcePress = async () => {
    try {
      this.setState({ loading: true, source: null })

      const source = await stripe.createSourceWithParams({
        type: 'alipay',
        amount: 50,
        currency: 'EUR',
        returnURL: 'example://stripe-redirect',
      })
      this.setState({ loading: false, source })
    } catch (error) {
      this.setState({ loading: false })
    }
  }