Integrate NodeJS and Authorize.net
Trexle connects NodeJS to Authorize.net and 100+ other payment gateways using a single plugin for one time annual fee
Authorize.net and NodeJS Integration Guide
To obtain the API Login ID and Transaction Key you need to log into the Merchant Interface. Click account from the main toolbar. Under Security Settings, click API Credentials & Keys as shown below.
Enter your Secret Answer and select New Transaction Key. Click Submit to continue. Your new Transaction Key is displayed.
Note: If the Disable Old Transaction Key Immediately box is not checked, the old Transaction Key will automatically expire in 24 hours. When the box is checked, the Transaction Key expires immediately.
Take the credentials you just obtained from Authorize.net and navigate to Trexle dashboard, click Payments Gateways and select Authorize.net from the drop down menu as shown below.
Fill into your Authorize.net credential and click Add Gateway. Click the Activate button next to Authorize.net, and it will give you a success message and the button will turn into green. You should see something like below.
In your NodeJS project, open a terminal and issue the following command:
npm install trexlejs
If you want to test, consider writing the following example in a test.js file:
var Trexle = require('trexlejs');
var trexle = Trexle.setup({
key: ‘your-api-key’,
production: false
});
trexle.createCharge({
amount: 400,
currency: ‘usd’,
description: ‘test charge’,
email: ‘[email protected]’,
ip_address: ‘66.249.79.118’,
card: {
number: ‘4242424242424242’,
expiry_month: 8,
expiry_year: 2018,
cvc: 123,
name: ‘John Milwood’,
address_line1: ‘423 Shoreline Park’,
address_city: ‘Mountain View’,
address_postcode: 94043,
address_state: ‘CA’,
address_country: ‘US’
}
}, function (response) {
console.log(response.body);
});
Then run the code:
node test.js
Use any expiration date after today’s date. If the card code is required, please use any 3-digit combination for Visa, Mastercard, Discover, Diners Club, EnRoute, and JCB; use a 4-digit combination for American Express.
Test Card Brand | Number |
American Express | 370000000000002 |
Discover | 6011000000000012 |
JCB | 3088000000000017 |
Diners Club/ Carte Blanch | 38000000000006 |
Visa | 4007000000027 |
4012888818888 | |
4111111111111111 | |
MasterCard | 5424000000000015 |
2223000010309703 | |
2223000010309711 |
Other integrations between Authorize.net and Nodejs
Official Node.js SDK for the Authorize.Net payments platform
the module requires NodeJS version 4.8.4 or higher and is hosted on Github and
NPM. To get started using this SDK, it's highly recommended to download Authorize.net sample code repository from https://github.com/AuthorizeNet/sample-code-node but if you want to use NPM directly you should use the instructions on https://www.npmjs.com/package/authorizenet the official NPM module for authorize.net
The extension is provided by Authorize.net and is Free
Authorize.net Supported Countries
Authorize.net Supported Payment Processing Actions
✔ Authorize
✔ Capture
✔ Void
✔ Credit
✔ Recurring
✔ Card Store
Key Features
About Trexle
Trexle is a powerful online recurring subscription billing platform that integrate Authorize.net and other +100 payment gateways with NodeJS and other dozen of e-commerce platforms.
About Authorize.net
Authorize.Net is a payment gateway service provider allowing merchants to accept credit card and electronic check payments through their Web site and over an IP connection.
About NodeJS
Node.js is an open-source, cross-platform JavaScript runtime environment for executing JavaScript code server-side, and uses the Chrome V8 JavaScript engine. Historically, JavaScript was used primarily for client-side scripting, in which scripts written in JavaScript are embedded in a webpage's HTML, to be run client-side by a JavaScript engine in the user's web browser. Node.js enables JavaScript to be used for server-side scripting, and runs scripts server-side to produce dynamic web page content before the page is sent to the user's web browser.