Currently only supports vault transactions, more will be added soon
A wrapper to access the Moneris API, forked from AlejandroEsquivel's great work (AlejandroEsquivel/moneris-js), forked from shaynair's great work (shaynair/moneris-js)
The hope for this module is to create clean, robust, promise wrapped queries that extend just beyond payments. Shaynair's work supported generalized queries to Moneris, Alejandro's work handled the imperfect formatting. My hope is to extend and complete the wrapper, transforming the project into something easy to implement by any developer.
Installation | Usage | Example |f License
With npm:
npm install moneryze --save
Note: You need an engine that supports ES6 (e.g. Babel or Node 4.0+).
const moneris = require('moneryze');
Queries the Moneris API with the information provided.
config
: Required. An object with the following fields.app_name
: Optional. If given, will addapp_name
as a prefix to receipt names.api_token
: Required. Your API token.store_id
: Required. Your store ID.crypt_type
: Optional. If given, will set the default crypt_type for all transactions.7
by default.test
: Optional. If true, uses Moneris Test endpoints. You can get aapi_token
andstore_id
for this endpoint from Moneris's Documentation.false
by default.
.init() must be called before any other operation, otherwise an error will be thrown
moneris.init({
app_name: 'Test',
store_id: 'store5',
api_token: 'yesguy',
crypt_type: '7',
test: true,
});
pan
: Required. card number.expdate
: Required. Expiry date of the card.
moneris.resAddCC({
pan: '4242424242424242',
expdate: '2011',
});
token
: Required. customer's moneris token.amount
: Required. amount to chargedescription
: Optional. A short message attached to the purchase.
moneris.resPurchaseCC({
token: 'D8WyyItuNb6mHn4biiPqAwM42',
amount: 11.98,
description: 'bubble tea',
});
With love and passion,
wuon