Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Demo application showing how to use Fiserv's Payment.js

Rellum/Payment.js

Repository files navigation

Payment.js Documentation

  • More documentation can be found here
  • A demo can be found here
  • Access to Payment.js can be requested here

Getting Started

We only send webhooks to the URL you provide when registering here. This URL must be accessible over HTTPS. This demo will assist you in generating an SSL certificate using Let's Encrypt and running the demo on HTTPS.

Set up

  • A Ubuntu build on AWS works fine for this demo. Set one up, open ports 80 & 443. Make sure you assign an IP address or a custom domain name.
  • Next you need to generate an SSL certificate. Follow this tutorial
  • Please see the 'generateSSL' folder as we have provided the code there.
  • Simply, you generate your certificate, rename the folder well-known -> .well-known, update the file name inside acme-challenge, update the contents and run the index file inside generateSSL. Let's Encrypt will provide you with a certificate and then you're ready to run your server.
  • Now navigate to config.json in the route and set your API keys which can be retrieved from here
  • In the same folder set your domain name without the prefix of http or https.
  • Finally, run the command sudo npm run build:and:start
  • Navigate to your URL such as https://paymentjs.atelyr.com/prod (not the uat or prod at the end). Now you are ready to try it out.

Test Details

  • Test card number: 5204740000001002
  • Expiry year: 22
  • Expiry month: 10
  • CVV: 002

Building the server

  1. npm install
  2. npm run build:server
  3. npm run build:client
  4. sudo npm start or npm run build:and:start

sudo is required to use HTTPS

Configuration

Gateway and Payment.js developer app credentials & domain are stored in config.json (https://docs.firstdata.com/req/paymentjs)

Note: for the webhook callback to work, an accessible webhook url needs to be registered in the developer app for Payment.js.

About

Demo application showing how to use Fiserv's Payment.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published