Integrate NodeJS and Be2bill
Trexle connects NodeJS to Be2bill and 100+ other payment gateways using a single plugin for one time annual fee
Be2bill and NodeJS Integration Guide
First of all, you must have received your public API Key email, which contains technical information:
- API key ID
- API key
- URL to be used with your sandbox credentials
REMINDER
The URL and credentials to use for your transactions depend on the processing environment. During the integration and QA phase, we strongly recommend you to use the sandbox credentials.
You must also have received your Be2bill Account’s credentials, which will be necessary to proceed the second step.
API KEY credentials
These identifiers are dedicated to specific online store configurations, as mobile application or SDK, and make it possible to carry out a restricted list of operations.
-
IDENTIFIERstring(1-32)
Your processing account technical identifier.
-
APIKEYstring (16)
The API key, private or public value (depending on the API KEY type) associated with an
APIKEYID
. -
APIKEYIDstring (36)
An ID associated to the
APIKEY
. This parameter must be included in each transaction request.
All these credentials need to setup in your account dashboard before you start using Be2Bill
Take the credentials you just obtained from Be2bill and navigate to Trexle dashboard, click Payments Gateways and select Be2bill from the drop down menu as shown below.
Fill into your Be2bill credential and click Add Gateway. Click the Activate button next to Be2bill, 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
CB OK : 5555556778250000
Problème bancaire : (idéal pour faire des tests complets)
CB KO : 5555557376384001 (Transaction refusée par le réseau bancaire)
CB KO : 5555554530114002 (Fonds insuffisants)
CB KO : 5555558726544005 (Suspicion de fraude)
CB KO : 5555550082334006 (Carte perdue)
CB KO : 5555553818524007 (Carte volée)
(Toutes les cartes de tests sont disponibles dans la doc technique fournie par Be2Bill)
Date d’expiration : Mettre une date dans le futur.
Code de sécurité : n’importe quelle combinaison de 3 chiffres
Be2bill Supported Countries
Be2bill 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 Be2bill and other +100 payment gateways with NodeJS and other dozen of e-commerce platforms.
About Be2bill
Be2Bill provides the ability to optimise user experience and offer features that respond to the your clients' evolving practices. Be2Bill 360 degree overview of the payment process coupled with the collaborative approach they take to working the the merchants, enables them to analyse the data through powerful data engine minimising the risks of fraudlent transactions.
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.