- Clone the project
- Install dependencies:
$ npm install
-
Create api keys in sandbox
- Add your Secret Key to the
dotsSecretKeyvariable inapp.js - Add your client ID to the
dotsClientIdvariable inindex.htmland inapp.js - Set the correct Dots api url in
app.js(sandbox or production)
- Add your Secret Key to the
-
Run the sample server:
$ node app.js
- Navigate to http://localhost:5000 in your browser, enter
4111 1111 1111 1111as the test card number with a valid expiration date and123as the CVV Code and click Pay - Optional: Look in the browser's developer console to see payment intent creation logs