@calistyle/infutor
Node SDK for Infutor
Last updated 2 years ago by scottbwyatt .
Original npm · Tarball · package.json
$ cnpm install @calistyle/infutor 
SYNC missed versions from official npm registry.

Infutor SDK

NPM version Build Status Test Coverage Dependency Status

Strongly typed Node SDK for Inftor's IDMAX

Installation

npm install @calistyle/infutor

Documentation

Module documentation

Usage

Setup

const Infutor = require('@calistyle/infutor').Infutor
const infutor = new Infutor()

infutor.configure({
  login: 'your-username',
  password: 'your-password'
});

Customer

// retrieve a customer
nmi.customer.get({
  fname: 'John',
  lname: 'Smith',
  phone: '1234567890'
})

Handling Errors

try {
  let customer = await infutor.customer.get('<customer_obj>');

  // success!

}
catch(err) {

  if (err.isInfutor) {
    // payment or gateway error - see err.response
  }
  else {
    // connection or outside error
  }

}

Current Tags

  • 1.0.0-alpha.3                                ...           latest (2 years ago)

3 Versions

  • 1.0.0-alpha.3                                ...           2 years ago
  • 1.0.0-alpha.2                                ...           2 years ago
  • 1.0.0-alpha.1                                ...           2 years ago
Maintainers (2)
Downloads
Today 0
This Week 0
This Month 3
Last Day 0
Last Week 3
Last Month 1
Dependencies (3)
Dev Dependencies (10)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |