Content-Length: 283217 | pFad | http://github.com/auridevil/paypalec.js

8A GitHub - auridevil/paypalec.js: Library for Paypal Express Checkout for Node.js
Skip to content

auridevil/paypalec.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

paypalec.jsBuild Status

(Yet Another) Library for Paypal Express Checkout for Node.js

Installation

The easiest installation is through NPM:

npm install paypalec.js

Or clone the repo https://github.com/auridevil/paypalec.js and include the ./PaypalService script.

API

Initialize:

var PaypalService = require('paypalec.js');
var paypalEC = new PaypalService('USER','PWD','SIGNATURE',isProduction);

Ask Authorization:

paypalEC.askAuthorization(
    <AMOUNT>,
    <CURRENCYCODE>,
    <cancelURL>,
    <acceptURL,
    {<extraOptions},
    function onOk(err,res){
        if(!err)
            console.log(paypalEC.generatePaymentUrlFromRaw(res));
    });

Get Details:

paypalEC.askExpressCheckoutDetails(<TOKEN>,{},
    function onOk(err,res) {
        if(!err)
            console.log(JSON.stringify(paypalEC.objectify(res)));
    });

Do ExpressCheckout Payment:

paypalEC.doExpressCheckoutPayment(
    <TOKEN>,
    <PAYERID>,
    <AMOUNT>,
    <CURRENCYCODE>,
    {<extraOptions},
    function onOk(err,res) {
        if(!err)
            console.log(JSON.stringify(paypalEC.objectify(res)));
    });

Do Capture:

paypalEC.doCapture(
    <TRANSACTIONID>,
    <AMOUNT>,
    <CURRENCYCODE>,
    {<extraOptions},
    function onOk(err,res) {
        if(!err)
            console.log(JSON.stringify(paypalEC.objectify(res)));
    });

Do Void:

paypalEC.doVoid(
    <TRANSACTIONID>,
    {<extraOptions},
    function onOk(err,res) {
        if(!err)
            console.log(JSON.stringify(paypalEC.objectify(res)));
    });

Docs

The library is based on the following paypal guide for ExpressCheckout Authorize and Capture: https://developer.paypal.com/docs/classic/express-checkout/ht_ec-singleAuthPayment-curl-etc/

In the /docs folder you can find a jsDoc of the library with all others methods documented.

Contributions

If you find bugs or want to change functionality, feel free to fork and pull request.

Notes

The library use the es6 language, please make sure your node version supports it (we currently used 4.3.1).

Cheers from digitalx.

About

Library for Paypal Express Checkout for Node.js

Resources

License

Stars

Watchers

Forks

Packages

No packages published








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/auridevil/paypalec.js

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy