There are many payment gateways available today for our application. Today, I am going to create a sample application to integrate Node.js application with CardConnect Payment gateway.
We will use here Axios package of NPM to connect with CardConnect API.
Create new project folder and create a file named server.js, Have a look on code inside server.js below:
In the above code, At the top we have method getPaymentAuthToken method used for getting auth token for card connect server. Test credentials for sandbox has been used everywhere in the file. In middle there is a makeCharge method which is actually charging the required amount from the card/bank detail.
node server.js
Integration of CardConnect payment is very easy with Node.js. If you are new to Node.js then click here find many demos to start the app for enterprise-level application
Let me know your thoughts over the email demo.jsonworld@gmail.com. I would love to hear them and If you like this article, share with your friends.
Thank you!