payum-client

0.0.3 • Public • Published

PayumClientNodeJs

The Node.js client for a payment processing micro service: PayumServer

var payumServerUri = 'http://localhost';

var payum = require('payum-client')(payumServerUri);

payum.payment.create({totalAmount: 100, currencyCode: 'USD'}, function(err, payment) {
    if (!err) {
        payum.token.create({type: 'capture', paymentId: payment.id, afterUrl: 'http://google.com'}, function(err, token) {

            // redirect user to this url token.targetUrl or you can pass this url to the browser and use payum.js to do everything on your page.
        });
    }
});

Readme

Keywords

none

Package Sidebar

Install

npm i payum-client

Weekly Downloads

0

Version

0.0.3

License

MIT

Last publish

Collaborators

  • makasim