Skip to content

Commit 39aeb3c

Browse files
update advanced integration format to support v1 and v2 (#87)
1 parent 4fe6e5a commit 39aeb3c

File tree

19 files changed

+56
-428
lines changed

19 files changed

+56
-428
lines changed

advanced-integration/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1-
# Advanced Integration Example
1+
# Advanced Checkout Integration Example
22

3-
This folder contains example code for an Advanced PayPal integration using both the JS SDK and Node.js to complete transactions with the PayPal REST API.
3+
This folder contains example code for a PayPal advanced Checkout integration using both the JavaScript SDK and Node.js to complete transactions with the PayPal REST API.
4+
5+
* [`v2`](v2/README.md) contains sample code for the current advanced Checkout integration. This includes guidance on using Hosted Card Fields.
6+
* [`v1`](v1/README.md) contains sample code for the legacy advanced Checkout integration. Use `v2` for new integrations.
47

58
## Instructions
69

10+
These instructions apply to the sample code for both `v2` and `v1`:
11+
712
1. Rename `.env.example` to `.env` and update `PAYPAL_CLIENT_ID` and `PAYPAL_CLIENT_SECRET`.
813
2. Run `npm install`
914
3. Run `npm start`

advanced-integration/beta/README.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

advanced-integration/package.json

Lines changed: 0 additions & 24 deletions
This file was deleted.

advanced-integration/v1/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.env

advanced-integration/v1/README.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
# Advanced Integration Example
22

3-
This folder contains example code for an Advanced PayPal integration using both the JS SDK and Node.js to complete transactions with the PayPal REST API.
3+
This folder contains example code for [version 1](https://developer.paypal.com/docs/checkout/advanced/integrate/sdk/v1) of a PayPal advanced Checkout integration using the JavaScript SDK and Node.js to complete transactions with the PayPal REST API.
4+
5+
> **Note:** Version 1 is a legacy integration. Use [version 2](https://developer.paypal.com/docs/checkout/advanced/integrate/) for new integrations.
46
57
## Instructions
68

7-
1. Rename `.env.example` to `.env` and update `PAYPAL_CLIENT_ID` and `PAYPAL_CLIENT_SECRET`.
8-
2. Run `npm install`
9-
3. Run `npm start`
10-
4. Open http://localhost:8888
11-
5. Enter the credit card number provided from one of your [sandbox accounts](https://developer.paypal.com/dashboard/accounts) or [generate a new credit card](https://developer.paypal.com/dashboard/creditCardGenerator)
9+
1. [Create an application](https://developer.paypal.com/dashboard/applications/sandbox/create).
10+
2. Rename `.env.example` to `.env` and update `PAYPAL_CLIENT_ID` and `PAYPAL_CLIENT_SECRET`.
11+
3. Run `npm install`.
12+
4. Run `npm start`.
13+
5. Open http://localhost:8888.
14+
6. Enter the credit card number provided from one of your [sandbox accounts](https://developer.paypal.com/dashboard/accounts) or [generate a new credit card](https://developer.paypal.com/dashboard/creditCardGenerator).

advanced-integration/v1/client/app.js

Lines changed: 0 additions & 186 deletions
This file was deleted.

advanced-integration/v1/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@
66
"type": "module",
77
"scripts": {
88
"test": "echo \"Error: no test specified\" && exit 1",
9-
"start": "nodemon server/server.js",
9+
"start": "nodemon server.js",
1010
"format": "npx prettier --write **/*.{js,md}",
1111
"format:check": "npx prettier --check **/*.{js,md}",
12-
"lint": "npx eslint server/*.js --env=node && npx eslint client/*.js --env=browser"
12+
"lint": "npx eslint server.js paypal-api.js --env=node && npx eslint public/*.js --env=browser"
1313
},
1414
"license": "Apache-2.0",
1515
"dependencies": {

0 commit comments

Comments
 (0)