1
我发现了一个paypal自己写的为node的图书馆,他们写了一个关于如何支付的伟大图书馆。我仍然处于困惑的状态,如何收到付款,我现在用尽了时间。如何使用节点中的paypal-rest进行直接付款?
使用情况非常简单,用户A单击某个项目添加到他的车,他就可以有选择,它要么支付使用信用卡/借记卡或PayPal(快速结账)
我的目标依然在信用卡/借记卡,用户决定使用信用卡/借记卡来接收付款,并使用paypal-rest-api sdk来完成此操作。但看代码示例IM在选择哪个样品超级混乱,从
https://github.com/paypal/PayPal-node-SDK/tree/master/samples
var card_data = {
"type": "visa",
"number": "4417119669820331",
"expire_month": "11",
"expire_year": "2018",
"cvv2": "123",
"first_name": "Joe",
"last_name": "Shopper"
};
paypal.creditCard.create(card_data, function(error, credit_card){
if (error) {
console.log(error);
throw error;
} else {
console.log("Create Credit-Card Response");
console.log(credit_card);
}
})
在card_data
,没有量,我真的糊涂了。
再次使用的情况下
用户可以在网站上购买物品,并且他支付使用信用卡/借记卡,它会自动从他的银行账户送的钱到我的贝宝企业账户。
,所以我只需要更换与'req.body.data'数据的代码片段? – sinusGob
例如'“金额”:{“total”:req.body.price}'? – sinusGob
是的,看起来像 –