A react-Native project just to demonstrate how to integrate the PayPal for checkout. Current project uses react-native-paypal as a third-party library for PayPal integration.
Android Demo | iOS Demo |
---|---|
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
First of all, you need a Braintree account to integrate PayPal to the react-native project. After creating an account you will get Merchant ID, Public Key, and Private key. Now link your Braintree account to the PayPal account by following this link
Now you are ready to test the PayPal feature. Just follow these simple steps.
git clone https://github.com/awais-fastian/React-Native-Braintree-Paypal-Example.git
cd React-Native-Braintree-Paypal-Example
Browse to the server folder
cd server
Now run these commands on terminal
npm install
Open .env file and put Merchant ID, Public Key and Private key there
npm run start
Now you are ready to test the PayPal feature on iOS as well as on Android
Browse to example folder on a separate terminal
cd example
react-native run-android
react-native run-android
- Nodejs - JavaScript runtime environment that executes JavaScript code outside of a web browser
- React-native - Mobile application framework
- Braintree - a platform that delivers PayPal, Venmo (in the US), credit and debit cards, and popular digital wallets like Apple Pay and Google Pay in a single, seamless integration.
- Paypal - American company operating a worldwide online payment system that supports online money transfers and serves as an electronic alternative to traditional paper methods like checks and money orders.
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.