Skip to content

A react native interface for integrating payments using PayPal

License

Notifications You must be signed in to change notification settings

upsidelab/react-native-paypal

 
 

Repository files navigation

react-native-paypal

Getting started

Installation

npm install @ekreative/react-native-paypal

Android Specific

Add this to your build.gradle

maven {
  url  "https://cardinalcommerceprod.jfrog.io/artifactory/android"
  credentials {
    username 'paypal_sgerritz'
    password 'AKCp8jQ8tAahqpT5JjZ4FRP2mW7GMoFZ674kGqHmupTesKeAY2G8NcmPKLuTxTGkKjDLRzDUQ'
  }
}

If you already use @ekreative/react-native-braintree package in your app you should to remove this lines from your build.gradle

maven {
  url  "https://cardinalcommerce.bintray.com/android"
  credentials {
    username 'braintree-team-sdk@cardinalcommerce'
    password '220cc9476025679c4e5c843666c27d97cfb0f951'
  }
}

iOS Specific

TODO

Usage

import Paypal from " @ekreative/react-native-paypal";

// ...

Paypal.startWithOrderId({
  clientId: 'YOUR_CLIENT_ID',
  useSandbox: true, // you should use 'false' for live environment
  orderId: 'YOUR_ODRED_ID', //should be fetched from your backend
  returnUrl: 'YOUR_RETURN_URL',
  cancelErrorCode: 'ON_CANCEL', //optional, default value - PAYPAL_CANCELLED
})
  .then(approvalData => console.log(approvalData))
  .catch(error => console.log(error));

License

MIT

About

A react native interface for integrating payments using PayPal

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Kotlin 52.5%
  • Swift 29.1%
  • Ruby 10.4%
  • Objective-C 6.5%
  • JavaScript 1.5%