Integrate NodeJS and Payjunction
Trexle connects NodeJS to Payjunction and 100+ other payment gateways using a single plugin for one time annual fee
Payjunction and NodeJS Integration Guide
For PayJunction Integration, you will need the following credentials: Terminal ID and Unique Application Key
You can find Terminal ID by login to your PayJunction account
At the bottom of the left menu, click on the icon More
Click Users
Select appropriate Admin User
Terminal ID for your merchant account is noted in the far-right column labeled ID.
You will receive Unique Application Key by email, after submitting request on this online form.
After your request has been approved you will receive both a Labs (Testing) Application Key and a Production (Live) Application Key.
Take the credentials you just obtained from Payjunction and navigate to Trexle dashboard, click Payments Gateways and select Payjunction from the drop down menu as shown below.
Fill into your Payjunction credential and click Add Gateway. Click the Activate button next to Payjunction, 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
Visa:
- 4444 3333 2222 1111
- 4111 1111 1111 1111
- 4242 4242 4242 4242
Mastercard:
- 5105 1051 0510 5100
- 5555 5555 5555 4444
- 2223 0000 4840 0011
Amex:
- 3714 496353 98431
- 3434 343434 34343
- 3782 822463 10005
Discover:
- 6011 1111 1111 1117
- 6011 0004 0000 0000
- 6011 0009 9013 9424
Diner Club:
- 3614 890064 7913
- 3670 010200 0000
- 3056 930902 5904
JCB:
- 3566 1111 1111 1113
- 3528 0007 0000 0000
- 3530 1113 3330 0000
Test Expiration Date: 01/22
Test CCV : 999 [or 9999 if Amex] (If your settings are checking for CCV)
Test Address: 1903 (If your settings are checking for Address)
Zip Code: 93101 (If your settings are checking for Zip Code)
Payjunction Supported Countries
Payjunction 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 Payjunction and other +100 payment gateways with NodeJS and other dozen of e-commerce platforms.
About Payjunction
PayJunction was founded in 2000 with a vision of making payment processing easier, more secure, and more effective. PayJunction provides transaction processing services for tens of thousands of businesses that process in excess of a billion dollars annually.
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.