clt-api

1.3.1 • Public • Published

A nodejs wrapper for President Collect Service API NPM version

NPM status

Unofficial JavaScript implementation of the CLT SDK for Node.js.

Installing

The preferred way to install the CLT SDK for Node.js is to use the npm package manager for Node.js. Simply type the following into a terminal window:

npm install clt-api

Usage

After you've installed the SDK, you can require the CLT package in your node application using require:

var CLT = require('clt-api');

Here is a quick example that makes some requests against CLT CVS with the SDK:

// Load the CLT SDK for Node.js
var CLT = require('clt-api');
 
/**
 * Don't hard-code your password!
 * Load them from disk or your environment instead.
 */
// CLT.config.update({
//  cvsCustId: 'YOUR_CVS_CUST_ID',
//  cvsCustPassword: 'YOUR_CVS_CUST_PASSWORD',
//  cocsLinkId: 'YOUR_COCS_LINK_ID',
//  cocsHashBase: 'YOUR_COCS_HASH_BASE'
// });
 
// Instead, do this:
CLT.config.loadFromPath('./path/to/config.json');
 
// Query order information.
var cvs = CLT.CVS;
cvs.orderQuery({
  UpdateTimeBegin: 'YYYY-MM-DD HH:mm:ss',
  UpdateTimeEnd: 'YYYY-MM-DD HH:mm:ss'
}, function (err, callback) {
  if (err) {
    console.log(err);
  } else {
    console.log(callback);
  }
});

Supported Services

The SDK currently supports the following services:

Service Name Class Name
CLT Payment By CVSCLT.CVS
CLT Payment By Credit CardCLT.COCS

Dependencies (5)

Dev Dependencies (0)

    Package Sidebar

    Install

    npm i clt-api

    Weekly Downloads

    15

    Version

    1.3.1

    License

    none

    Last publish

    Collaborators

    • calvert