【问题标题】:QuickPay node.js REST apiQuickPay node.js REST API
【发布时间】:2016-09-22 13:37:41
【问题描述】:

有没有人研究过QuickPay REST api,我通过互联网找到了一些有用的资源,但还不够。我在 Postman 上测试过,效果很好

【问题讨论】:

    标签: javascript node.js payment-gateway payment


    【解决方案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);
    
            });
    }
    

    使用put方式支付金额

    【讨论】:

      猜你喜欢
      • 2014-09-12
      • 2016-12-20
      • 2014-04-28
      • 2021-03-11
      • 2019-02-20
      • 1970-01-01
      • 2013-04-28
      • 2021-02-09
      • 2023-04-01
      相关资源
      最近更新 更多