{"analyzedAt":"2022-12-14T05:56:15.246Z","collected":{"metadata":{"name":"globalpayments-api","scope":"unscoped","version":"1.4.8","description":"Global Payments SDK for NodeJS for Heartland and Global Payments eCommerce gateways","date":"2022-12-13T14:21:48.719Z","author":{"name":"Heartland Payment Systems"},"publisher":{"username":"heartland","email":"EntApp_DevPortal@e-hps.com"},"maintainers":[{"username":"heartland","email":"EntApp_DevPortal@e-hps.com"}],"repository":{"type":"git","url":"git+https://github.com/globalpayments/node-sdk.git"},"links":{"npm":"https://www.npmjs.com/package/globalpayments-api","homepage":"https://github.com/globalpayments/node-sdk#readme","repository":"https://github.com/globalpayments/node-sdk","bugs":"https://github.com/globalpayments/node-sdk/issues"},"license":"GPL-2.0","dependencies":{"@azz/elementtree":"^0.1.6","es6-promise":"^4.2.8","sha1":"^1.1.1","typedarray":"^0.0.6","url":"^0.11.0"},"devDependencies":{"@hitc/netsuite-types":"^2017.2.32","@types/node":"^12.20.7","ava":"^0.17.0","awesome-typescript-loader":"^3.5.0","npm-run-all":"^4.1.5","prettier":"^1.18.2","rimraf":"^2.6.3","tslint":"^4.5.1","typedoc":"^0.22.13","typescript":"4.2.3","webpack":"^3.12.0"},"releases":[{"from":"2022-11-14T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":3},{"from":"2022-09-15T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":3},{"from":"2022-06-17T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":3},{"from":"2021-12-14T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":4},{"from":"2020-12-14T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":9}],"hasTestScript":true,"readme":"<a href=\"https://github.com/globalpayments\" target=\"_blank\">\r\n    <img src=\"https://globalpayments.github.io/images/globapaymentsLogo.png\" alt=\"Global Payments logo\" title=\"Global Payments\" align=\"right\" width=\"225\" />\r\n</a>\r\n\r\n# Heartland & Global Payments Node.js SDK\r\n\r\nThis SDK makes it easy to integrate your Node.js application with our Card Not Present and Card Present APIs.\r\n\r\n## Solutions\r\n\r\n### General / Omnichannel\r\n\r\n* API Payment Processing\r\n* Apple Pay & Google Pay\r\n* Secure Card Storage & Customer Management\r\n* Subscriptions / Recurring Billing Solutions\r\n* Credit, Debit, Gift & Loyalty, and eCheck/ACH\r\n\r\n### Card Not Present (Ecommerce & MOTO) Specific\r\n\r\n* Minimize PCI compliance requirements with Hosted Payment Solutions\r\n* 140+ Authorization Currencies & 16 Settlement Currencies\r\n* 150+ Local Payment Methods Worldwide\r\n* Account Updater\r\n* Inbuilt Fraud Prevention Rules\r\n* 3D Secure, AVS and CVV Checks\r\n* 260+ Global Enterprise Fraud Rules\r\n\r\n### Card Present (Terminal & POS) Specific\r\n\r\n* Secure End-To-End Encryption\r\n\r\n## Requirements\r\n\r\n* Node.js\r\n\r\n## Installation\r\n\r\nInstalling the SDK into your solution is usually be done by either using NPM or Yarn.\r\n\r\nTo install via [NPM](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):\r\n\r\n```\r\nnpm install --save globalpayments-api\r\n```\r\n\r\nTo install via [Yarn](https://yarnpkg.com/lang/en/docs/installing-dependencies/):\r\n\r\n```\r\nyarn add globalpayments-api\r\n```\r\n\r\n## Documentation and Examples\r\n\r\nYou can find the latest SDK documentation along with code examples and test cards on the [Global Payments](https://developer.realexpayments.com) and [Heartland](https://developer.heartlandpaymentsystems.com/documentation) Developer Hubs.\r\n\r\nIn addition you can find working examples in the our example code repository.\r\n\r\n_Quick Tip_: The included [test suite](https://github.com/globalpayments/node-sdk/tree/master/test) can be a great source of code samples for using the SDK!\r\n\r\n#### Process a Payment Example\r\n\r\n```javascript\r\nconst card = new CreditCardData();\r\ncard.number = \"4111111111111111\";\r\ncard.expMonth = \"12\";\r\ncard.expYear = \"2025\";\r\ncard.cvn = \"123\";\r\n\r\ncard\r\n  .charge(129.99)\r\n  .withCurrency(\"EUR\")\r\n  .execute()\r\n  .then((response) => {\r\n    const result = response.responseCode;\r\n    const message = response.responseMessage;\r\n  })\r\n  .catch((e) => {\r\n    // handle  errors\r\n  });\r\n```\r\n\r\n#### Test Card Data\r\n\r\n| Name        | Number           | Exp Month | Exp Year | CVN  |\r\n| ----------- | ---------------- | --------- | -------- | ---- |\r\n| Visa        | 4263970000005262 | 12        | 2025     | 123  |\r\n| MasterCard  | 2223000010005780 | 12        | 2019     | 900  |\r\n| MasterCard  | 5425230000004415 | 12        | 2025     | 123  |\r\n| Discover    | 6011000000000087 | 12        | 2025     | 123  |\r\n| Amex        | 374101000000608  | 12        | 2025     | 1234 |\r\n| JCB         | 3566000000000000 | 12        | 2025     | 123  |\r\n| Diners Club | 36256000000725   | 12        | 2025     | 123  |\r\n\r\n#### Testing Exceptions\r\n\r\nDuring your integration you will want to test for specific issuer responses such as 'Card Declined'. Because our sandbox environments do not actually reach out to issuing banks for authorizations, there are specific transaction amounts and/or card numbers that will trigger gateway and issuing bank responses. Please contact your support representative for a complete listing of values used to simulate transaction AVS/CVV results, declines, errors, and other responses that can be caught in your code. Example error handling code:\r\n\r\n```javascript\r\ncard\r\n  .charge(-5)\r\n  .withCurrency(\"USD\")\r\n  .withAddress(address)\r\n  .execute()\r\n  .catch((e) => {\r\n    switch (e.name) {\r\n      case BuilderError.constructor.name:\r\n        // handle builder errors\r\n        break;\r\n      case ConfigurationError.constructor.name:\r\n        // handle errors related to your services configuration\r\n        break;\r\n      case GatewayError.constructor.name:\r\n        // handle gateway errors/exceptions\r\n        break;\r\n      case UnsupportedTransactionError.constructor.name:\r\n        // handle errors when the configured gateway doesn't support\r\n        // desired transaction\r\n        break;\r\n      case ApiError.constructor.name:\r\n      default:\r\n        // handle all other errors\r\n        break;\r\n    }\r\n  });\r\n```\r\n\r\n## Contributing\r\n\r\nAll our code is open sourced and we encourage fellow developers to contribute and help improve it!\r\n\r\n1. Fork it\r\n2. Create your feature branch (`git checkout -b my-new-feature`)\r\n3. Ensure SDK tests are passing\r\n4. Commit your changes (`git commit -am 'Add some feature'`)\r\n5. Push to the branch (`git push origin my-new-feature`)\r\n6. Create new Pull Request\r\n\r\n## License\r\n\r\nThis project is licensed under the GNU General Public License v2.0. Please see [LICENSE.md](LICENSE.md) located at the project's root for more details."},"npm":{"downloads":[{"from":"2022-12-13T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":186},{"from":"2022-12-07T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":766},{"from":"2022-11-14T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":3398},{"from":"2022-09-15T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":12306},{"from":"2022-06-17T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":30963},{"from":"2021-12-14T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":60372}],"starsCount":0},"github":{"starsCount":20,"forksCount":22,"subscribersCount":7,"issues":{"count":64,"openCount":48,"distribution":{"3600":3,"10800":0,"32400":1,"97200":0,"291600":0,"874800":4,"2624400":8,"7873200":4,"23619600":6,"70858800":24,"212576400":14},"isDisabled":false},"contributors":[{"username":"securesubmit-buildmaster","commitsCount":18},{"username":"slogsdon","commitsCount":3}],"commits":[{"from":"2022-12-07T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":1},{"from":"2022-11-14T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":1},{"from":"2022-09-15T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":2},{"from":"2022-06-17T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":2},{"from":"2021-12-14T00:00:00.000Z","to":"2022-12-14T00:00:00.000Z","count":4}]},"source":{"files":{"readmeSize":4772,"testsSize":1045244,"hasNpmIgnore":true,"hasChangelog":true},"linters":["prettier","tslint"],"outdatedDependencies":{"typedarray":{"required":"^0.0.6","stable":"0.0.7","latest":"0.0.7"}}}},"evaluation":{"quality":{"carefulness":0.9999999999999999,"tests":0.6,"health":0.75,"branding":0},"popularity":{"communityInterest":51,"downloadsCount":4102,"downloadsAcceleration":-11.38053652968036,"dependentsCount":0},"maintenance":{"releasesFrequency":1,"commitsFrequency":0.3960273972602739,"openIssues":0.25,"issuesDistribution":0}},"score":{"final":0.5055615280672393,"detail":{"quality":0.8364556389013833,"popularity":0.10311588496470457,"maintenance":0.6243836475976507}}}