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
是的,看起來像 –