0.0.3 • Published 8 years ago

payum-client v0.0.3

Weekly downloads
-
License
MIT
Repository
-
Last release
8 years ago

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.
        });
    }
});
0.0.3

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago