Jengahq is Equity's Jenga API V2 wrapper for Laravel.
Note: This package is still under active development. See Contributing to start contributing.
The recommended way to install Jengahq is through Composer
composer require ammly/jengahq
See instructions for installing Composer if you don't have it installed.
This package requires the following
"php": ">=5.5.0",
"guzzlehttp/guzzle": "~6.0"
Register for an accout at JengaHq and obtain your credentials
Follow the Official Documentation guide on how to generate your ssl keys and upload your public key to your account's API Keys section.
Store the keys in your Laravel project's storage
folder.
Populate the following configs on your .env
file.
JENGA_USERNAME=
JENGA_PASSWORD=
JENGA_API_KEY=
JENGA_PHONE=
JENGA_BASE_ENDPOINT=https://uat.jengahq.io
Include the package on to your file
<?php
use Ammly\Jengahq\Jengahq;
Then you can new up a new instance and send your request.
$jengahq = new Jengahq;
$jengahq->sendMoney($params);
Or use the Jengahq
Facade
Jenga::sendMoney($params);
Use $jengahq->authenticate()
to generate a token that will be sent as the Authorization
header of every request. This is called automatically by all actions in this package.
Use $jengahq->accountBalance()
to check account balance.
Sample
<?php
use Ammly\Jengahq\Jengahq;
$params = [
'account_id' => 1100161816677,
'country_code' => 'KE',
'date' => date('Y-m-d'),
];
$jenga = new Jengahq;
$jenga->accountBalance($params);
Use $jengahq->sendMoney()
to send money through Pesalink
or InternalFundsTransfer
for an Internal Equity account.
Sample
<?php
use Ammly\Jengahq\Jengahq;
$params = [
'country_code' => 'KE',
'date' => date('Y-m-d'),
'source_name' => 'John Doe',
'source_accountNumber' => '0001092883',
'destination_name' => 'Jane Doe',
'destination_mobileNumber' => '25474738846',
'destination_bankCode' => 63,
'destination_accountNumber' => '9200002773',
'transfer_currencyCode' => 'KES',
'transfer_amount' => '10',
'transfer_type' => 'PesaLink', //Or InternalFundsTransfer
'transfer_reference' => '127364836548',
'transfer_description' => 'Some description',
];
$jenga = new Jengahq;
$jenga->sendMoney($params);
Use $jenga->iprsSearch($params)
to perform an IPRS
search.
sample
<?php
use Ammly\Jengahq\Jengahq;
$params = [
'country_code' => 'KE',
'account_id' => '1100161816677';
'document_type' => 'ID'; // Or Passport
'first_name' => 'John';
'last_name' => 'Doe';
'document_number' => '28663883';
];
$jenga = new Jengahq;
$jenga->iprsSearch($params);
Please see the changelog for more information on what has changed recently.
$ composer test
Please see contributing.md for details and a todolist.
If you discover any security related issues, please email ammlyf@gmail.com instead of using the issue tracker.
MIT. Please see the license file for more information.