[英]PayPal modules for Node.js
我需要實現一些在Node.js項目中使用PayPal的功能。 支持PayPal的Node.js的可用庫是什么?
謝謝,
可現在是PayPal的Node.js的SDK為REST API的,非常容易在這里
var paypal_sdk = require('paypal-rest-sdk');
paypal_sdk.configure({
'host': 'api.sandbox.paypal.com',
'port': '',
'client_id': '<Client ID>',
'client_secret': '<Client Secret ID>'
});
var card_data = {
"type": "visa",
"number": "4417119669820331",
"expire_month": "11",
"expire_year": "2018",
"cvv2": "123",
"first_name": "Joe",
"last_name": "Shopper"
};
paypal_sdk.credit_card.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);
}
})
我記得當時正在從事類似的項目,在瀏覽網絡以查找故障排除想法時,我偶然發現了當時對我有用的線程。 我試圖找到該線程,我想就是這個 。 希望這對您有用,我記得這對我來說是個令人沮喪的項目之一。 迪娜
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.