Download the PHP package nevar/mpesa without Composer
On this page you can find all versions of the php package nevar/mpesa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package mpesa
Laravel MPESA
Introduction
This package is still under developement. A full and descriptive documentation is coming soon. Work with the functionality under the table of contents for now
Contents
- Installation
- STK-Push
Installation
-
Run the following command to install:
composer require nevar/mpesa
-
If you are using older versions of Laravel 5 be sure to include the following provivers in your app/config.php
-
Then run
php artisan vendor:publish --tag=mpesa-config
-
Add the following values to you .env file
-
MPESA_DEVELOPEMENT_MODE
should be false if in production otherwise leave it as true - If you're developing login and get test credentials from here so as to populate your environment variables.
STK-Push
-
Below is a use case on how to request for payment via STK-Push.
-
Set up your call back incase of successfull or cancelled payments . Your callback url should match the .env variable
MPESA_CALLBACK_URL
or$stk->callBackURL
override. For more information on the json response from MPESA visit here - Otherwise here is a sample of the IPN callback
NB Create an issue incase of any problems.