How to use the tipsi-stripe.completeNativePayRequest 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 / ApplePayScreen.js View on Github external
},
      [{
        label: 'Whisky',
        amount: '50.00',
      }, {
        label: 'Vine',
        amount: '60.00',
      }, {
        label: 'Tipsi',
        amount: '110.00',
      }])

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

      if (this.state.complete) {
        await stripe.completeNativePayRequest()
        this.setState({ status: 'Apple Pay payment completed' })
      } else {
        await stripe.cancelNativePayRequest()
        this.setState({ status: 'Apple Pay payment cenceled' })
      }
    } catch (error) {
      this.setState({ loading: false, status: `Error: ${error.message}` })
    }
  }