Skip to content

Commit

Permalink
update advanced integration format to support v1 and v2 (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
devapplepaypal authored Oct 24, 2023
1 parent 4fe6e5a commit 39aeb3c
Show file tree
Hide file tree
Showing 19 changed files with 56 additions and 428 deletions.
9 changes: 7 additions & 2 deletions advanced-integration/README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
# Advanced Integration Example
# Advanced Checkout Integration Example

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.
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.

* [`v2`](v2/README.md) contains sample code for the current advanced Checkout integration. This includes guidance on using Hosted Card Fields.
* [`v1`](v1/README.md) contains sample code for the legacy advanced Checkout integration. Use `v2` for new integrations.

## Instructions

These instructions apply to the sample code for both `v2` and `v1`:

1. Rename `.env.example` to `.env` and update `PAYPAL_CLIENT_ID` and `PAYPAL_CLIENT_SECRET`.
2. Run `npm install`
3. Run `npm start`
Expand Down
13 changes: 0 additions & 13 deletions advanced-integration/beta/README.md

This file was deleted.

24 changes: 0 additions & 24 deletions advanced-integration/package.json

This file was deleted.

1 change: 1 addition & 0 deletions advanced-integration/v1/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
15 changes: 9 additions & 6 deletions advanced-integration/v1/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
# Advanced Integration Example

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.
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.

> **Note:** Version 1 is a legacy integration. Use [version 2](https://developer.paypal.com/docs/checkout/advanced/integrate/) for new integrations.
## Instructions

1. Rename `.env.example` to `.env` and update `PAYPAL_CLIENT_ID` and `PAYPAL_CLIENT_SECRET`.
2. Run `npm install`
3. Run `npm start`
4. Open http://localhost:8888
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)
1. [Create an application](https://developer.paypal.com/dashboard/applications/sandbox/create).
2. Rename `.env.example` to `.env` and update `PAYPAL_CLIENT_ID` and `PAYPAL_CLIENT_SECRET`.
3. Run `npm install`.
4. Run `npm start`.
5. Open http://localhost:8888.
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).
186 changes: 0 additions & 186 deletions advanced-integration/v1/client/app.js

This file was deleted.

File renamed without changes.
4 changes: 2 additions & 2 deletions advanced-integration/v1/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
"type": "module",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"start": "nodemon server/server.js",
"start": "nodemon server.js",
"format": "npx prettier --write **/*.{js,md}",
"format:check": "npx prettier --check **/*.{js,md}",
"lint": "npx eslint server/*.js --env=node && npx eslint client/*.js --env=browser"
"lint": "npx eslint server.js paypal-api.js --env=node && npx eslint public/*.js --env=browser"
},
"license": "Apache-2.0",
"dependencies": {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit 39aeb3c

Please sign in to comment.