1.0.0 • Published 5 years ago

rn-stripe-webview v1.0.0

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

rn-stripe-webview

Integrate Stripe to your React Native project without its native SDKs.

API

PropTypedefaultValue
publicKey (required)string
amount (required)number
imageUrl (required)string
storeName (required)string
description (required)string
allowRememberMe (required)boolean
storeName (required)string
onPaymentSuccess (required)function
onClose (required)function
currencystringUSD
prepopulatedEmailstring
styleViewStyle
render() {
  return <StripeCheckout
    publicKey="sk_test_****"
    amount={100000}
    imageUrl="https://pbs.twimg.com/profile_images/778378996580888577/MFKh-pNn_400x400.jpg"
    storeName="Stripe Checkout"
    description="Test"
    currency="USD"
    allowRememberMe={false}
    prepopulatedEmail="test@test.com"
    onClose={this.onClose}
    onPaymentSuccess={this.onPaymentSuccess}
  />
}

onPaymentSuccess = (token) => {
  // send the stripe token to your backend!
}

onClose = () => {
  // maybe navigate to other screen here?
}

For more information please read their docs