You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+27-14Lines changed: 27 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -17,42 +17,55 @@
17
17
<hr />
18
18
</div>
19
19
20
-
# PayPal JavaScript FullStack Advanced Checkout
21
-
This sample app shows how to build and customize a card payment form to accept debit and credit cards. Please make sure to style the card form so that it aligns with your business branding.
This sample app shows you how to build and customize a card payment form to accept debit and credit cards and using 3Ds for authentification. Style the card form so that it aligns with your business branding.
22
22
23
23
To create this application from scratch, follow the [Advanced Checkout integration](https://developer.paypal.com/docs/checkout/advanced/integrate) guide from the [PayPal Developer](https://developer.paypal.com/home) docs.
24
24
25
+
### Run this App
25
26
26
-
## Run this project
27
+
You can run this app locally or on [Stackblitz](https://stackblitz.com/edit/pp-so?file=README.md).
27
28
28
-
###PayPal Codespaces
29
-
[](https://codespaces.new/paypaldev/PayPal-JavaScript-FullStack-Advanced-Checkout-Sample?devcontainer_path=.devcontainer%2Fdevcontainer.json)
29
+
#### Run it locally
30
+
You will need to create a `.env` file with the following environment variables:
30
31
31
-
- Rename the ``.env.example`` file to `.env`.
32
-
- Add your environment variables in the `.env` file.
32
+
```shell
33
+
CLIENT_ID=
34
+
APP_SECRET=
35
+
```
33
36
34
-
### Locally
35
-
36
-
- Rename the `.env.example` file to `.env`.
37
-
- Add your environment variables in the `.env` file.
37
+
In the `checkout.ejs` replace the `YOUR_CLIENT_ID` string in the `script` tag with your PayPal Client ID.
38
38
39
39
Complete the steps in [Get started](https://developer.paypal.com/api/rest/) to get the following sandbox account information from the Developer Dashboard:
40
40
- Sandbox client ID and the secret of [a REST app](https://www.paypal.com/signin?returnUri=https%3A%2F%2Fdeveloper.paypal.com%2Fdeveloper%2Fapplications&_ga=1.252581760.841672670.1664266268).
41
41
- Access token to use the PayPal REST API server.
42
42
43
43

44
44
45
-
Now, run the following commands in your terminal:
45
+
Now, run the following command in your terminal:
46
46
47
47
`npm install`
48
48
49
-
`npm start` and navigate to [http://localhost:8888/](http://localhost:8888/).
49
+
`npm run start`
50
+
51
+
and navigate in your browser to: `http://localhost:9597/`.
0 commit comments