Skip to content Skip to sidebar Skip to footer

Quickpay Node.js Rest Api

Has someone worked on worked on QuickPay REST api, I went through internet to find some useful resource but it was not enough. I tested on Postman and it worked well

Solution 1:

var _ = require('underscore');
var quickPay = require('quick-pay');

var version = {
    "Accept-Version": "v10",
    "Authorization": "your basic authentication"};


var transaction_id ={};

function processCreatePayment(req, res, next) {
    var random_order_id = _.random(1000, 99999999999999999999);

    var parameters = {
        "currency": "INR",
        "order_id": random_order_id 
    };
    quickPay.post("payments/", version, parameters)
        .then(function(result) {
            console.log(result);
            res.send(result);
            transaction_id = result.id;
            console.log(transaction_id);
        })
        .catch(function(err) {

            console.log(err.response);
            res.send(err.response);

        });
}

Use put method with amount for payment


Post a Comment for "Quickpay Node.js Rest Api"