【发布时间】:2016-09-22 13:37:41
【问题描述】:
有没有人研究过QuickPay REST api,我通过互联网找到了一些有用的资源,但还不够。我在 Postman 上测试过,效果很好
【问题讨论】:
标签: javascript node.js payment-gateway payment
有没有人研究过QuickPay REST api,我通过互联网找到了一些有用的资源,但还不够。我在 Postman 上测试过,效果很好
【问题讨论】:
标签: javascript node.js payment-gateway payment
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方式支付金额
【讨论】: