42-cent
Version:
Node.js multi-gateway payment processing module
49 lines (33 loc) • 3.97 kB
Markdown
[](https://img.shields.io/david/continuous-software/42-cent.svg) [](https://github.com/continuous-software/42-cent)
42-cent
=======
> Node.js multi-gateway payment processing module
## Installation
$ npm install -s 42-cent
## Usage
```Javascript
var Gateways = require('42-cent');
var client = Gateways.use('Authorize.Net', credentials);
```
You can register other gateways - or replace an existing one:
```Javascript
Gateways.registerGateway('GatewayName', factoryFunction);
```
The factory function must return an instance of the abstract [BaseGateway](https://github.com/continuous-software/42-cent-base).
## Gateways API
Gateways must implement a particular version of the [BaseGateway](https://github.com/continuous-software/42-cent-base). The version of `42-cent-base` set in the `package.json` of the gateway defines the API the gateway intends to fulfill.
You can see the API the gateway intends to fulfill by looking at the [BaseGateway](https://github.com/continuous-software/42-cent-base) appropriate version tag.
## Supported Gateways
**Note:** All builds are run daily thanks to [Travis CI cron jobs](https://docs.travis-ci.com/user/cron-jobs/).
[](https://travis-ci.org/continuous-software/node-authorize-net) [Authorize.net](https://github.com/continuous-software/node-authorize-net)
[](https://travis-ci.org/continuous-software/42-cent-braintree) [Braintree](https://github.com/continuous-software/42-cent-braintree)
[](https://travis-ci.org/continuous-software/node-nmi) [NMI](https://github.com/continuous-software/node-nmi)
[](https://travis-ci.org/continuous-software/42-cent-omise) [Omise](https://github.com/continuous-software/42-cent-omise)
[](https://travis-ci.org/continuous-software/node-payflow) [Payflow](https://github.com/continuous-software/node-payflow)
[](https://travis-ci.org/continuous-software/node-rocketgate) [RocketGate](https://github.com/continuous-software/node-rocketgate)
[](https://travis-ci.org/continuous-software/42-cent-stripe) [Stripe](https://github.com/continuous-software/42-cent-stripe)
[](https://travis-ci.org/continuous-software/node-virtualmerchant) [VirtualMerchant](https://github.com/continuous-software/node-virtualmerchant)
[](https://travis-ci.org/continuous-software/42-cent-paypal) [PayPal](https://github.com/continuous-software/42-cent-paypal)
[](https://travis-ci.org/continuous-software/42-cent-worldpay) [WorldPay](https://github.com/continuous-software/42-cent-worldpay)
[](https://travis-ci.org/continuous-software/node-beanstream) [Beanstream](https://github.com/continuous-software/node-beanstream)
[](https://travis-ci.org/continuous-software/42-cent-moneris) [Moneris](https://github.com/continuous-software/42-cent-moneris)