For signing the data use the MD5 algorithm.

API uses two hash codes:

SID – Securty Identifier

UID – Unique Identifier (payment code retured by the API)

POS software generates the SID and API generates the UID.

SID

client_secret – variable from authentication

vat_number – Unique ID of the company

business_place – Short code of business place (given after registration)

business_device – serial number of POS device in a business place (given after registration)

bill_number – serial number of the receipt/bill

bill_datetime – date/time of the receipt/bill uses ISO 8601 format (WAT – West Africa Time)

total_value –  total amount of the receipt/bill

Formula:

Signing the data

$buffer = $client_secret;

$buffer .= $vat_number;

$buffer .= $business_place;

$buffer .= $business_device;

$buffer .= $bill_number;

$buffer .= $bill_datetime;

$buffer .= $total_value;

$security_code = md5($buffer);

// npm package: https://www.npmjs.com/package/js-md5

var md5 = require('js-md5');

var buffer = client_secret;

buffer += vat_number;

buffer += business_place;

buffer += business_device;

buffer += bill_number;

buffer += bill_datetime;

buffer += total_value;

var security_code = md5(buffer);

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments