This sample app shows you how to build and customize a card payment form to accept debit and credit cards and use 3Ds for authentification. Please make sure to style the card form so that it aligns with your business branding.
To create this application from scratch, follow the Advanced Checkout integration guide from the PayPal Developer docs.
- Rename the
.env.example
file to.env
. - Add your environment variables in the
.env
file.
PAYPAL_CLIENT_ID=YOUR_CLIENT_ID
PAYPAL_
- Rename the
.env.example
file to.env
. - Add your environment variables in the
.env
file.
PAYPAL_CLIENT_ID=YOUR_CLIENT_ID
PAYPAL_CLIENT_SECRET=YOUR_APP_SECRET
Complete the steps in Get started to get the following sandbox account information from the Developer Dashboard:
- Sandbox client ID and the secret of a REST app.
- Access token to use the PayPal REST API server.
Now, run the following command in your terminal:
npm install
npm run start
and navigate in your browser to: http://localhost:9597/
.
Card Type: Visa
Card Number: 5458406954745076
Expiration Date: 01/2025
CVV: 123
Card Type: Visa
Card Number: 4928527426776525
Expiration Date: 01/2025
CVV: 123
The PayPal Developer community helps you build your career while improving your products and the developer experience. You’ll be able to contribute code and documentation, meet new people and learn from the open-source community.
- Website: developer.paypal.com
- Twitter: @paypaldev
- GitHub: @paypal