Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including pxpost with all npm packages installed. Try it out:

var pxpost = require("pxpost")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

pxpost v1.0.0

A node module for using the Payment Express PXPost service for payment processing

Build Status pxpost ======

A node module for using the Payment Express PXPost service for payment processing. Currently only supporting making payments.

##Usage

var pxpost = require('pxpost');
pxpost.submit({
    user: 'PaymentExpressUser',
    password: 'PaymentExpressPassword',
    amount: '100.00',
    currency: 'NZD', //defaults to NZD
    transactionType: 'purchase', //default and currently only supported option
    reference: 'Merchant Reference',
    card: {
        name: 'John Doe',
        number: '4716710503591290',
        expiry:'1015',
        cvc2: '123'
    }
} ,function (err, result) {
    if (err) {
        //do something
    } else {
        console.log(result.Authorized);//Will be 1 for successful transaction
    }
});

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free