- Fork and/or Clone this repo.
$ git clone https://github.com/paypaldev/node-app-examples.git
- Run
$ cd node-app-examples - Run
$ npm install - Run
$ node install.js
First go to developer.paypal.com to Create a New App.
- Login to developer.paypal.com with your PayPal Login and Password.
- Click on Dashboard at the top.
- Under "REST API apps" click on Create App
- Enter an "App Name" and select a sandbox Business Account to use.
- You should now see your
Client IDand a link to show yourClient Secret. Click the Link to show theClient Secret. - In your terminal run
$ node setup.js
When running $ node setup.js you'll be requested for your client_id and client_secret. The application will collect those credentials and create a directory called ppconfig with a file sandbox.json. Your credentials will be placed in that file for use with the API's.
Example of ppconfig/sandbox.json:
{
"client_id": "<YOUR_CLIENT_ID>",
"client_secret": "<YOUR_CLIENT_SECRET>"
}Note: If you'd like to change your credentials in the future, you can simply go into the file at
ppconfig/sandbox.json. Or, simply re-run$ node setup.jsfrom thenode-app-examplesdirectory.
Currently these examples are setup to show the PayPal Express Checkout solution or the "PayPal Check Out" solution. Other checkout methods and examples will be added in the near future.
- This is a very basic example of ExpressJS using PayPal API and Express Checkout.
- This is a progression from the Simple-Express-Server app, in that it adds the PayPal In-Context Experience.
- This is a basic example using KrakenJS with the PayPal In-Context Experience.
- This is a progression from the Kraken-In-Context app, adding in AngularJS for the front-end APIs.
- This is a simple example using HapiJS with the PayPal In-Context Experience.
Refer to the specific example's README for additional information.
- First you'll need to
$ cdor "Change Directory" into the directory of the app you'd like to run. - Run the appropriate start command as stated in the
READMEin the app's directory.
Here's an example of the steps to run the simple-express-server:
- Run
$ cd simple-express-server - Run
$ node app.js
Feel free to contribute to this repo, or file issues for any requests!