I need to implement some functionality which uses PayPal in my Node.js project. What is the available libraries for Node.js that supports PayPal?
Thanks,
This article (and the follow-up) by James Carr is a pretty good discussion. It makes use of his npm module, paynode.
EDIT: The linked articles have disappeared (thanks for the tip-off, @UpTheCreek). But the module itself is still there and has documentation.
Available Now is PayPal's Node.js SDK for REST APIs , Very Easy Here
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);
}
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With