paypal-express-checkout-es6
Version:
nodejs library for paypal express checkout api support
55 lines (41 loc) • 1.3 kB
Markdown
Nodejs library for paypal express checkout
Note: Full documentation is not ready yet. Please take a look at code. It will make sense because it is with flow types.
``` sh
gulp build
```
All functions basically uses `call` function to send API request.
For reference please refer to https://developer.paypal.com/docs/classic/express-checkout/
```js
import Paypal from 'paypal-express-checkout-es6';
const config = {
USER,
PWD,
SIGNATURE,
isSandbox
};
const paypal = new Paypal(config);
paypal.call(method, params);
```
```js
paypal.call('SetExpressCheckout', {
PAYMENTREQUEST_0_PAYMENTACTION: 'SALE', // type of payment
PAYMENTREQUEST_0_AMT: 19.95, // amount of transaction
PAYMENTREQUEST_0_CURRENCYCODE: 'USD', // currency of transaction
RETURNURL: 'http://www.example.com/success.html', // URL of your payment confirmation page
CANCELURL: 'http://www.example.com/cancel.html'// URL redirect if customer cancels payment
});
```
These functions are available for parallel payment.
* setExpressCheckout
* doExpressCheckoutPayment
* getExpressCheckoutDetails
* getReferenceAuthToken
* createBillingAgreement
* doReferenceTransaction