Strongly typed Node SDK for Inftor's IDMAX
npm install @calistyle/infutor
const Infutor = require('@calistyle/infutor').Infutor
const infutor = new Infutor()
infutor.configure({
login: 'your-username',
password: 'your-password'
});
// retrieve a customer
nmi.customer.get({
fname: 'John',
lname: 'Smith',
phone: '1234567890'
})
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
}
}