Integrate NodeJS and Borgun
Trexle connects NodeJS to Borgun and 100+ other payment gateways using a single plugin for one time annual fee
Borgun and NodeJS Integration Guide
Borgun’s Restful Payment Gateway enables merchants to accept payments in a variety of ways. After receiving Public and Private access tokens from Borgun you can start accepting payments.
Private Access Token is your secret token and should be treated as confidential and sensitive information. This token gives you full access to RPG’s functionality.
Public Access Token is your public token and can safely be embedded into client applications and websites. This token can only be used to create single use card tokens that can then be used to charge the card using the Private access token.
All these Token be only got from your account Dashboard once you signup with Borgun
Other information which is needed are as below
MercahntId: Borgun provides this code
MerchantContractNumber: Borgun provides this code
Processor: Borgun provides this code
Usename: Borgun provides your username
Password: Borgun provides your password
Take the credentials you just obtained from Borgun and navigate to Trexle dashboard, click Payments Gateways and select Borgun from the drop down menu as shown below.
Fill into your Borgun credential and click Add Gateway. Click the Activate button next to Borgun, 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
Borgun provides test cards only on request for that too for specific time period. It does not provide a public list of test cards for developers.
Borgun Supported Countries
Borgun 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 Borgun and other +100 payment gateways with NodeJS and other dozen of e-commerce platforms.
About Borgun
Borgun understands the importance of secure and efficient online payment service. Their solutions are reliable, fast and secure and are designed to meet the needs of any business. Borgun B-Gateway is a crucial part of the online payment processing value chain. Borgun B-Gateway allows merchants to obtain authorizations for card transactions and submit transactions for clearing and settlement.
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.