8

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,

Feras Odeh
  • 9,136
  • 20
  • 77
  • 121
  • 2
    A quick comment as this showed up first in my search via Google: PayPal released a [REST API for node](https://github.com/paypal/rest-api-sdk-nodejs) in April 2013. More details are at the [PayPal developer site](https://developer.paypal.com/webapps/developer/docs/api/). – Matthew Bakaitis May 11 '13 at 14:30

4 Answers4

3

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.

Phil Booth
  • 4,853
  • 1
  • 33
  • 35
2

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);
  }
})
Hasan Al-Natour
  • 1,936
  • 2
  • 14
  • 22
0

When looking for Node.js modules always check out the official modules wiki page.

I could only find one Paypal module, the Paypal IPN module which can only verify IPN messages.

If you need anything more than that you will probably have to build it yourself.

-1

I recall working on similar project and when browsing the web for troubleshooting ideas, I stumbled upon a thread that was useful for me at the time. I tried locating that thread, I think it's this. Hope this works out for you, I remember it was one of those frustrating projects for me. Dina

Dina Kaiser
  • 476
  • 3
  • 6