This tutorial shows how we can integrate the CardConnect payment gateway within your nodeJs based projects. We gonna use
axios npm module to make request to CardConnect APIs.
Here are simple steps to access the CardConnect APIs and make payments using CardConnect.Authorization
Step 1: Initialize the project with npm init command. It will create a package.json file in the project root folder.
Step 2: Install the dependencies of the project, as I mentioned above we gonna use <code>axios</code>, it’s a Promise based HTTP client. So let’s install it with below command.
Step 3: We gonna use two APIs, first one is to get payment auth token and the second one is to charge the customer. copy and paste below code in a .js file, ex: payment.js file and run the code.
Step 4: Run the above code with below command.
I hope you like this Post, Please feel free to comment below, your suggestion and problems if you face - we are here to solve your problems.
I am Arjun from Hyderabad (India). I have been working as a software engineer from the last 7+ years, and it is my passion to learn new things and implement them as a practice. Aside from work, I like gardening and spending time with pets.