Posted inTechnology / Node.js / Programming

How to integrate CardConnect payment Gateway with Node JS

Today, We want to share with you How to integrate CardConnect payment Gateway with Node JS.In this post we will show you Payment Gateway API Integration with CardConnect using Node JS, hear for Node JS – Integrate Stripe Payment Gateway in Express JS we will give you demo and example for implement.In this post, we will learn about Payment Integration With Node.Js: : Express, Request and Paystack API with an example.

How to integrate CardConnect payment Gateway with Node JS

There are the Following The simple About How to integrate CardConnect payment Gateway with Node JS Full Information With Example and source code.

As I will cover this Post with live Working example to develop Node.js PayPal – Create Direct Credit Card Payment, so the CardConnect Payments Integration for SAP by CardConnect for this example is following below.

Step 1: npm init command simple Init Web App

npm init --yes

Step 2: Install the dependencies

npm install axios

Step 3 : payment.js SAVE file / run


	
const axios = require('axios');
 
const config_datas = new Buffer('example:atmiya25').toString('base64')
 
const FetchAuthRequestPaymentToken = async (data) => {
 
    try {
 
        const config = {
            headers: {
                'Content-Type': 'application/json',
                'Authorization': `Basic ${config_datas}`
            }
        };
 
        const URL = 'https://fts.cardconnect.com:6443/cardconnect/rest/auth';
 
        return await axios.put(URL, data, config);
 
    } catch (error) {
 
        throw (error);
 
    }
}
 
const makeCharge = async (data) => {
 
    try {
 
        const config = {
            headers: {
                'Content-Type': 'application/json',
                'Authorization': `Basic ${config_datas}`
            }
        };
 
        const URL = 'https://fts.cardconnect.com:6443/cardconnect/rest/capture';
 
        return await axios.put(URL, data, config);
 
    } catch (error) {
 
        throw (error);
 
    }
}
 
 
 
(async() => {
 
    const NrequestPaymentData = await FetchAuthRequestPaymentToken({
        account: '8957785856665999',
        merchid: '8989898989556',
        amount: '1800', // simple here Smallest currency unit. e.g. 100 cents to charge $1.00
        expiry: '1260',
        currency: 'USD'
    });
 
    const charge = await makeCharge({
        merchid: NrequestPaymentData.data.merchid, 
        retref: NrequestPaymentData.data.retref
    });
 
    console.log(charge);
 
})();

Step 4: simple Run the above nodejs source code with below simple command.

    node payment.js
Web Programming Tutorials Example with Demo

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about How to integrate CardConnect payment Gateway with Node JS.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

I am Jaydeep Gondaliya , a software engineer, the founder and the person running Pakainfo. I'm a full-stack developer, entrepreneur and owner of Pakainfo.com. I live in India and I love to write tutorials and tips that can help to other artisan, a Passionate Blogger, who love to share the informative content on PHP, JavaScript, jQuery, Laravel, CodeIgniter, VueJS, AngularJS and Bootstrap from the early stage.

Leave a Reply

Your email address will not be published. Required fields are marked *

We accept paid guest Posting on our Site : Guest Post Chat with Us On Skype