Integrate NodeJS and Paygate
Trexle connects NodeJS to Paygate and 100+ other payment gateways using a single plugin for one time annual fee
Paygate and NodeJS Integration Guide
For PayGate integration you will need PayGate ID and PayGate Password (Encription Key)
To obtain these credentials go to PayGate Merchant Access Portal
Once you are logged in to your PayGate portal you can view your PayGate ID (top right corner).
The next step is to retrieve your Encryption Key. Click Product Configuration (under Administration menu item).
Click on the Configure button (under PayHost tab).
Encription key is at the top of the newly opened page.
Take the credentials you just obtained from Paygate and navigate to Trexle dashboard, click Payments Gateways and select Paygate from the drop down menu as shown below.
Fill into your Paygate credential and click Add Gateway. Click the Activate button next to Paygate, 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
Approved 3-D Secure Transactions
- Visa 4000000000000002
Approved Transactions
- Visa 4000000000000002
- MasterCard 5200000000000015
- American Express 378282246310005
- Diners Club 38520000023237
Insufficient Funds Transactions
- MasterCard 5200000000000023
- Visa 4000000000000028
- American Express 371449635398431
Declined Transactions
- Visa 4000000000000036
- MasterCard 5200000000000049
- Diners Club 30569309025904
Unprocessed Transactions
- MasterCard 5200000000000064
Expiry Date must be in the future; Card Holder & CVV can be made up.
Paygate Supported Countries
Paygate 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 Paygate and other +100 payment gateways with NodeJS and other dozen of e-commerce platforms.
About Paygate
PayGate is South African payment processor and has support for MasterCard and Visa, and optionally American Express and Diners Club. It was established in 1999 and with more than 19 years of consistent payment services delivery, it has grown into a global Payment Service Provider known as the pioneer of Africa and with satisfied clients on 5 continents.
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.