Download the PHP package akika/laravel-mwaloni without Composer
On this page you can find all versions of the php package akika/laravel-mwaloni. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download akika/laravel-mwaloni
More information about akika/laravel-mwaloni
Files in akika/laravel-mwaloni
Package laravel-mwaloni
Short Description A single-tenant Laravel package for integrating Mpesa, Equity Jenga API's and NCBA Loop API through Mwaloni Wallet
License MIT
Homepage https://github.com/akikadigital/laravel-mwaloni
Informations about the package laravel-mwaloni
Laravel Mwaloni Package by Mwaloni Limited
This Laravel package provides convenient methods for integrating Mwaloni functionalities into your Laravel application.
Installation
You can install the package via composer:
After installing the package, publish the configuration file using the following command:
This will generate a mwaloni.php file in your config directory where you can set your Mwaloni credentials and other configuration options.
.env file Setup
Add the following configurations into the .env file
NOTE:
- The mwaloni.php config file sets the default
MWALONI_ENVvalue tosandbox. This will always load sandbox url and credentials. - It also sets the default debug mode to true. When true, the package will log into the log destination provided
- The other variables except
MWALONI_ENVandMWALONI_DEBUGwill be provided by Mwaloni during onboarding. - When debug mode is set to true, Mwaloni will log both data object and result on every API call
Function Responses
All responses, will be in json format as received from the Mwaloni portal.
Sample failed response
Sample successful transaction response
Usage
Initializing Mwaloni
To initialize Mwaloni, paste the following code within your code.
Authentication
Authentication si required in order to consume Mwaloni APIs. The function below will perform authentication.
Authentication result
- A generated token can be used for up to 60 minutes.
Setting token
- On successful authentication, use the following function to set up the toke for use on subsequent calls.
Query account balance
A successful balance query response will have the below structure:
Send money to mpesa enabled lines
Send to mpesa till number
Send to mpesa paybill
Send to bank via ift
Send to bank via eft
Send to bank via pesalink
Send to bank via rtgs
Send via Stanbic
Send via MoMo
Query transaction status
KPLC Postpaid
Perform contact lookup
Send SMS
All versions of laravel-mwaloni with dependencies
illuminate/support Version >=5.0
illuminate/http Version >=5.0
guzzlehttp/guzzle Version >=7.5