@calistyle/infutor
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha.3 • Public • Published

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
  }

}

Readme

Keywords

none

Package Sidebar

Install

npm i @calistyle/infutor

Weekly Downloads

0

Version

1.0.0-alpha.3

License

none

Unpacked Size

6.17 kB

Total Files

10

Last publish

Collaborators

  • gpazo
  • scottbwyatt