{"_id":"@calistyle/nmi","_rev":"3-6e29a36f890ead57555acd4b4928b1a5","name":"@calistyle/nmi","dist-tags":{"latest":"1.0.0-alpha.4"},"versions":{"1.0.0-alpha.1":{"name":"@calistyle/nmi","version":"1.0.0-alpha.1","description":"Node SDK for Networking Merchants Inc's (NMI) Three Step Redirect API, Query API, Direct API","author":{"name":"scott-wyatt","email":"scottwyatt86@gmail.com","url":"https://cali-style.com"},"scripts":{"build":"tsc -p ./lib/tsconfig.release.json","lint":"tslint -p ./lib","watch":"tsc -w -p ./lib/tsconfig.release.json","test":"npm run clean && npm run lint && npm run build && nyc mocha","prepublishOnly":"npm run compile","compile":"npm run clean && npm run build","clean":"rm -rf dist","docgen":"documentation build dist/index.js --config documentation.yml -f md > docs.md"},"main":"dist/index.js","typings":"dist/index.d.ts","files":["dist"],"pre-commit":["test"],"dependencies":{"change-case":"^3.0.2","request":"^2.88.0","request-promise":"^4.2.2","xml-js":"^1.6.4","xml2js":"^0.4.19","xmlbuilder":"^10.0.0"},"devDependencies":{"@types/node":"~10.3.4","mocha":"^5","nyc":"^12.0.2","supertest":"^3.1.0","tslib":"~1.9.0","tslint":"~5.10.0","tslint-microsoft-contrib":"~5.0.3","tsutils":"~2.27.1","typescript":"~2.8.1"},"gitHead":"a63d8d04293d79db493ad676b0e6ff21e17708e7","_id":"@calistyle/nmi@1.0.0-alpha.1","_npmVersion":"5.6.0","_nodeVersion":"10.0.0","_npmUser":{"name":"scottbwyatt","email":"scott@calistyletechnologies.com"},"dist":{"integrity":"sha512-SHutBQ2I9lJUpdMZvLRUKKviCeOkcVyBKiEzrf3Ge2lJ3Fr5aibX2TRW2eRSk0Ysux4uEQahNAeBUEIVwMWBww==","shasum":"fa9890fbf16d1173b5b91d969c3736a0f338ac60","tarball":"https://registry.npmjs.org/@calistyle/nmi/-/nmi-1.0.0-alpha.1.tgz","fileCount":16,"unpackedSize":21385,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbdFBeCRA9TVsSAnZWagAAvtwP/2ZL/Ir9q3WgtElgjIGb\nET7q/wVM7OKNpLysHH4lF63evuxjEXTxm5Ux5EGheo3CeqXgDt2iE/Z6DBwo\n5XDYFkFoEOFotM2Y5DPREQy0eJso7TmqQpOpUUJ3Sclq0GKRIX58nYTomNa+\nJDCCkfGSrwqgAFuSbr1eEWJc9NuBoeZRbeObt2+c51eMa1LMiCgbhzAmdwQu\nLgDmWBQM2N8zyR0sO1Agcjzr1PG1EAEcvrbNnuSJ7Sq7ZkfUkdYlTNIwQZ6d\n0Jl6tY495fzdL+9kvQz6THA6yAISP7ZSXIXvIZPdixE+QnDUiGNMJihyNA+2\nKZnXiLnoSmCDuG6XbwVyHYWbjs+Yhq9kEijn8takZ50HHdCL1nQK6lHJxf43\npRBEcvAF/XJkskjQ6Jzjut+uf9kJXCAopncfXhS1Blzk2FL6xAt/XCn6TsFF\nbJnof2H0peYO5cx9qy7D/WTX42Lx483tY3bf3tAD09poaVR4JGuFg5ecN9Bh\nhXtRnWQiHfYDIm+I2FrqC90jjo5bDgqmJEUPmT7SKvwJh777wWFo6KJ+UiyH\n5S3g0ZfLhb47qZ8CYGicEgBk0aaMZ5GO87VRUNGCj0W5k90y4ALvz832iScv\nldSczB5lYG3Ok+O8W1vQgAP4cLAuAXeVLGZABHhbXEifXxg3qtGD8DY6KodS\n277L\r\n=EzMM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCsQmHtqsL9mvj7kXHAFlyYFpKVyUfO2pdwtnGAEMnutQIget1wpYaW92WLUzPZScZ96dx1yktKn4jwOWQBS2Kz6Eg="}]},"maintainers":[{"name":"gpazo","email":"gregpazo@gmail.com"},{"name":"scottbwyatt","email":"scott@calistyletechnologies.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nmi_1.0.0-alpha.1_1534349406037_0.8833740036892213"},"_hasShrinkwrap":false},"1.0.0-alpha.2":{"name":"@calistyle/nmi","version":"1.0.0-alpha.2","description":"Node SDK for Networking Merchants Inc's (NMI) Three Step Redirect API, Query API, Direct API","author":{"name":"scott-wyatt","email":"scottwyatt86@gmail.com","url":"https://cali-style.com"},"scripts":{"build":"tsc -p ./lib/tsconfig.release.json","lint":"tslint -p ./lib","watch":"tsc -w -p ./lib/tsconfig.release.json","test":"npm run clean && npm run lint && npm run build && nyc mocha","prepublishOnly":"npm run compile","compile":"npm run clean && npm run build","clean":"rm -rf dist","docgen":"documentation build dist/index.js --config documentation.yml -f md > docs.md"},"main":"dist/index.js","typings":"dist/index.d.ts","files":["dist"],"pre-commit":["test"],"dependencies":{"change-case":"^3.0.2","request":"^2.88.0","request-promise":"^4.2.2","xml-js":"^1.6.4","xml2js":"^0.4.19","xmlbuilder":"^10.0.0"},"devDependencies":{"@types/node":"~10.3.4","mocha":"^5","nyc":"^12.0.2","supertest":"^3.1.0","tslib":"~1.9.0","tslint":"~5.10.0","tslint-microsoft-contrib":"~5.0.3","tsutils":"~2.27.1","typescript":"~2.8.1"},"gitHead":"fd2fd0cddd177e22cc7bfae6f5f93f51953e4fb4","_id":"@calistyle/nmi@1.0.0-alpha.2","_npmVersion":"5.6.0","_nodeVersion":"10.0.0","_npmUser":{"name":"scottbwyatt","email":"scott@calistyletechnologies.com"},"dist":{"integrity":"sha512-UGo9T9K9IMJb9lUqJAPT7XJ4HIKulxMGJA7fBRpXY2ZnZdGXT6DB9bgRTjNbNvCTOXjY1vdGI4ZFQOcl0O4Pug==","shasum":"d25e340c610d8d4019880e20a989c11954f94fd3","tarball":"https://registry.npmjs.org/@calistyle/nmi/-/nmi-1.0.0-alpha.2.tgz","fileCount":16,"unpackedSize":22654,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbfdKKCRA9TVsSAnZWagAAbL0P/j4pbMe7McpzShbwz037\n7yt5hxrRH7R5AYKUrgBH8jjysF93Bxiv6JgRNb0VAlGy/j+PBGMFt8L7djKh\nBp2PuFzKFQhKvoapoKhjkCPD233FLt1wMWFXyJLepTSFX3z110ZeuWUTcMcT\n2HnNeDq4QMDSmNMGgG+wgP948dSuhqXg79xx7W5TjkaIlR38caVVaclQpAlV\n9ZwVb7gdL3lsgx07S2PJilRCZN+3u/hl83NW4HS7JGMj28XWtq3QWQ3Sn1CB\neLxf8AjTMwFmYbg6VMZYfvuM4QzTA4dLdLZ8wrNJNq242SmzMJgbFXjMq051\nOzsD1735bhpqhUJhKdn931jEe5fDP70gexpL5zp/+FuB3PbkX8kbpC0cS7ar\nmh81cRf5Hs4Fw4dYf9j/3PlI/Kyf+x2fntpxE+gunFm01z1hQDDCaMF+FV9g\nbCFtZFbnH7Bix3l62c9teDHhJOny6KFCk+l2NCSyvNRToGF3cTlOp12jEcSD\nGSuGCL4JQTJcAcG3t1lbyMD2U4Bme4gV73ztS6fkIUl4vpPJ7+y5G+LVLhiT\nlJeRtMKtW+p3zmsmp2dbrnMpndnFfppAXs1NoXd2RwkKK1IXB58SYbnkbbIG\nGBJMv8r/RYmOpVmxN2FYlXff9Kxaoi+bDnRzN+8B2Rfd4zCgs4g/pTA2654A\nd2i1\r\n=d2pB\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGKEFTJzsIUUz4XO9wVfJsAvAhOr5kJgnjM/iryQYdsdAiBywL5ZJxiLI3t1t7a0+INyfp2WiIBbK9IsjmLqKQgs5A=="}]},"maintainers":[{"name":"gpazo","email":"gregpazo@gmail.com"},{"name":"scottbwyatt","email":"scott@calistyletechnologies.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nmi_1.0.0-alpha.2_1534972553377_0.26840798694802714"},"_hasShrinkwrap":false},"1.0.0-alpha.4":{"name":"@calistyle/nmi","version":"1.0.0-alpha.4","description":"Node SDK for Networking Merchants Inc's (NMI) Three Step Redirect API, Query API, Direct API","author":{"name":"scott-wyatt","email":"scottwyatt86@gmail.com","url":"https://cali-style.com"},"scripts":{"build":"tsc -p ./lib/tsconfig.release.json","lint":"tslint -p ./lib","watch":"tsc -w -p ./lib/tsconfig.release.json","test":"npm run clean && npm run lint && npm run build && nyc mocha","prepublishOnly":"npm run compile","compile":"npm run clean && npm run build","clean":"rm -rf dist","docgen":"documentation build dist/index.js --config documentation.yml -f md > docs.md"},"main":"dist/index.js","typings":"dist/index.d.ts","pre-commit":["test"],"dependencies":{"change-case":"^3.0.2","request":"^2.88.0","request-promise":"^4.2.2","xml-js":"^1.6.4","xml2js":"^0.4.19","xmlbuilder":"^10.0.0"},"devDependencies":{"@types/node":"~10.3.4","documentation":"^8.1.1","mocha":"^5","nyc":"^13.0.1","supertest":"^3.3.0","tslib":"~1.9.0","tslint":"~5.10.0","tslint-microsoft-contrib":"~5.0.3","tsutils":"~2.27.1","typescript":"~2.8.1"},"gitHead":"9c04cc0aba19374ca233579a507fc796cdc12ae3","_id":"@calistyle/nmi@1.0.0-alpha.4","_npmVersion":"5.6.0","_nodeVersion":"10.0.0","_npmUser":{"name":"scottbwyatt","email":"scott@calistyletechnologies.com"},"dist":{"integrity":"sha512-9bBCiDaTR/HF/HIbTaoPscqBWidm5S1YgX8bwY20+/Mq/zM0bDTT48eoL+OgTHkj+HxWsESVOMH9QVJJCFHBew==","shasum":"4ef1dd8d0cf739a5ea6cad1f2d39bb73cd041d00","tarball":"https://registry.npmjs.org/@calistyle/nmi/-/nmi-1.0.0-alpha.4.tgz","fileCount":16,"unpackedSize":22773,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJboAdWCRA9TVsSAnZWagAALXgP/ifAfuwJJ5ra9t0OJOCa\n7llBxbRDVi4huoc8fahXt2I3OF50dHa22Y0HmCYv+TrutJEw1wDKHl9mEYzm\nXCsK9obHddeOKME/ItiOdMWQkVV7mY55AjqY9YHcr5VPv0Gq7hA7cLi/Itwd\nDxwM/thmlu+8LfcEJNs7v3mOj7PF/amwamAyKvgdIxCbrweiy80380LvZ2kw\nqOUwu5LZMYj0goTG3/QHBDQ5B1YRNta2+43hhFqSVrUgoGp5TEIJ+h2MW5Ee\nDQlcKdSGq4F0eK0PMYM4RrvDPj3I4PpAZ4oQOFDNWmSgIEEovQDukdll9IEb\nh4Pgx14ZTIyrH6p6kda4KGc69CfQ4HmV0iAF2kk1O6GCRnka/0Dl2PV0dgVc\nDYUfJauKJThIYuPLi+3N9ti0ortw1hYpgv6yyGBf+7uQtlyO5kVw+dcmpibF\nR2r6kJsPkMvCawRsQFGIr1aDcH2WLwRxGgrJlvrhqS+QfycFJ8tLr4hiQIQ0\nSo3uddH0+SjHGyMpja8lMRdnCem19TYEjvpKkK3Ndu+0oFvATuiPpK8VhhG0\n3qlSY8sov4qJfn02+RJX6lhiBzQFh/atXxFgGzYiRBUXQPuXx8k/O20MGzj7\neSHBrz17p9rVmb3CIEgii07I0r3JnL6zDG9iinZqqBZoIsblruyKVvCd8ehR\nCD2q\r\n=R8Uq\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBRrBT2AaD/G/qQ9j5V9Az/m1dOX9A0exAlag2r+mfLTAiEA5/do3Y6RRhhqdzRMQQX8WQ+IqA0QK/loNM3ULSqX7bw="}]},"maintainers":[{"name":"gpazo","email":"gregpazo@gmail.com"},{"name":"scottbwyatt","email":"scott@calistyletechnologies.com"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/nmi_1.0.0-alpha.4_1537214293061_0.7281040471524705"},"_hasShrinkwrap":false}},"time":{"created":"2018-08-15T16:10:05.780Z","1.0.0-alpha.1":"2018-08-15T16:10:06.124Z","modified":"2022-04-04T21:32:48.926Z","1.0.0-alpha.2":"2018-08-22T21:15:53.464Z","1.0.0-alpha.4":"2018-09-17T19:58:13.215Z"},"maintainers":[{"name":"gpazo","email":"gregpazo@gmail.com"},{"name":"scottbwyatt","email":"scott@calistyletechnologies.com"}],"description":"Node SDK for Networking Merchants Inc's (NMI) Three Step Redirect API, Query API, Direct API","author":{"name":"scott-wyatt","email":"scottwyatt86@gmail.com","url":"https://cali-style.com"},"readme":"# NMI SDK\n\n[![NPM version][npm-image]][npm-url]\n[![Build Status][ci-image]][ci-url]\n[![Test Coverage][coverage-image]][coverage-url]\n[![Dependency Status][daviddm-image]][daviddm-url]\n\nStrongly typed Node SDK for Networking Merchants Inc's (NMI) Three Step Redirect API, Query API, and Direct API\n\n# Installation\n```\nnpm install @calistyle/nmi\n```\n\n# Documentation\n\n[Module documentation](https://github.com/calistyle/nmi/docs.md)\n\n[NMI Three Step Redirect API docs](https://secure.networkmerchants.com/gw/merchants/resources/integration/integration_portal.php#3step_methodology)\n\n# Notes\n\nAll attribute names received from NMI will be converted to `camelCase` for uniformity. Attribute names sent to NMI will be converted to the appropriate `hypen-case` and `param_case` where appropriate. Additionally, some fields are aliased (e.g, `postalCode` => `postal`) to provide consistent access between the Three Step and Query APIs. \n\nYou can disable this completely by specifying `transform: false` in the configuration options.\n\nDispatched XML is generated by [xmlbuilder](https://github.com/oozcitak/xmlbuilder-js/wiki/Conversion-From-Object).\n\n# Usage\n\n## Setup\n```js\nconst NMI = require('@calistyle/nmi').NMI\nconst nmi = new NMI({\n  apiKey: 'your-key-here',\n  username: 'your-username',\n  password: 'your-password'\n})\n```\n\n## Transaction\n```js\n// create a sale\nnmi.transaction.create('sale', {\n  amount: 2.99,\n  redirectUrl: 'http://127.0.0.1/example',\n  billing: {\n    firstName: 'John',\n    lastName: 'Doe'\n  }\n});\n\n// execute a token\nnmi.transaction.execute('the-token');\n```\n\n## Handling Errors\n```js\ntry {\n  let txn = await nmi.transaction.execute('<some-token>');\n\n  // success!\n\n}\ncatch(err) {\n\n  if (err.isNMI) {\n    // payment or gateway error - see err.response\n  }\n  else {\n    // connection or outside error\n  }\n\n}\n```\n\n[npm-image]: https://img.shields.io/npm/v/@calistyle/nmi.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/@calistyle/nmi\n[ci-image]: https://img.shields.io/circleci/project/github/CaliStyle/nmi/master.svg\n[ci-url]: https://circleci.com/gh/CaliStyle/nmi/tree/master\n[daviddm-image]: http://img.shields.io/david/CaliStyle/nmi.svg?style=flat-square\n[daviddm-url]: https://david-dm.org/CaliStyle/nmi\n[coverage-image]: https://img.shields.io/codeclimate/coverage/github/CaliStyle/nmi.svg?style=flat-square\n[coverage-url]: https://codeclimate.com/github/CaliStyle/nmi/coverage\n","readmeFilename":"README.md"}