Integrate NodeJS and Flo2cash
Trexle connects NodeJS to Flo2cash and 100+ other payment gateways using a single plugin for one time annual fee
Flo2cash and NodeJS Integration Guide
Setup Integration Secret Hash Key in Merchant Console
The secret key is a value known only to you and Flo2Cash. The secret hash key is combined with the data you send from your website to create a message verification value; this value allows Flo2Cash to verify that the data provided has not been tampered with and also that it is you sending the request. The same process is used when providing data back to your website after the payment has processed. To set-up the integration secret hash key you need to login in your Merchant Console and go to the web payments channel settings.
If you have not previously generated a secret hash key it will be generated at this point. You can change the secret hash key at any stage by clicking on the “Change” button.
Take the credentials you just obtained from Flo2cash and navigate to Trexle dashboard, click Payments Gateways and select Flo2cash from the drop down menu as shown below.
Fill into your Flo2cash credential and click Add Gateway. Click the Activate button next to Flo2cash, 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
Using the Demo system and test credit cards
When using the Demo system, the URL to which you will be POSTing the payment requests to is different:
- Demo Transactions URL: http://demo.flo2cash.co.nz/web2pay/default.aspx
- Live Transactions URL: https://secure.flo2cash.co.nz/web2pay/default.aspx
Test Credit Card Numbers
All transactions made within the demo system must be done so with the credit card details below. Any other card numbers will be declined.
The transaction amount must be rounded to a whole dollar for successful transactions. There are various cent amounts that can be used to return certain fail situations.
Flo2cash Supported Countries
Flo2cash 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 Flo2cash and other +100 payment gateways with NodeJS and other dozen of e-commerce platforms.
About Flo2cash
Flo2Cash has been accelerating the cashflow of businesses and nonprofits since 2003! With thousands of satisfied clients, you can trust us with credit card and direct debit recurring payment solutions that will fit just right for your needs. Every interaction you have with Flo2Cash uses highest level of security and encryption. Flo2Cash are bank approved and a Level 1 PCI-DSS certified which makes your transactions as safe as a bank transaction.
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.