Download the PHP package itsmurumba/laravel-mpesa without Composer
On this page you can find all versions of the php package itsmurumba/laravel-mpesa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download itsmurumba/laravel-mpesa
More information about itsmurumba/laravel-mpesa
Files in itsmurumba/laravel-mpesa
Package laravel-mpesa
Short Description Laravel Package for Mpesa Daraja API
License MIT
Informations about the package laravel-mpesa
Introduction
This is a Laravel package for Safaricom Mpesa Daraja API. It includes all public available endpoints:
- Consumer to Business (C2B) payments
- Business to Consumer (B2C) payments
- Mpesa Express Payment (Lipa Na Mpesa Online)
- Transaction Status
- Account Balance
- Reversal
- Business to Business (B2B) payments
Installation
Run the following command to install Laravel Mpesa package in your Laravel project:
`
If you are using Laravel 5.5 and above, skip to the Configurations step.
After running the composer require above, you should add a service provider and alias of the package in config/app.php file.(For Laravel 5.4 and below)
`
Configurations
After installing the package, run the following command to install mpesa.php
configuartion file in the config
folder:
`
or `
Add and define the following variables in your .env
file
`
Usage
Add the following constructor inside your controller: ``
1. Mpesa Express Payment (Lipa Na Mpesa Online) `
- $phoneNumber = 254XXXXXXXXX
- $accountReference = Account Reference (maximum 12 characters)
- transactionDescription = Transaction Description (1-13 characters)
2. Mpesa Express Payment Query (Lipa Na Mpesa Online)
**3. C2B Register URLs**
4. Consumer to Business (C2B) payments `
- $commandId = can only be set to CustomerPayBillOnline or CustomerBuyGoodsOnline
- $billRefNumber = used on CustomerPayBillOnline option only e.g an Account Number. Set the value to
''
when commandId is CustomerBuyGoodsOnline
5. Business to Consumer (B2C) payments
**6. Transaction Status**
7. Account Balance
**8. Reversal**
9. Business to Business Payment(B2B)
`
Contribution
This is a community package and thus welcome anyone intrested to contribute in improving the package. Kindly go through the Contribution.md before starting to contribute. Keep those PRs and Issues coming.
Buy Me Coffee
Give this repo a star and i will have my super powers recharged. You can also follow me on twitter @ItsMurumba
License
This package is licensed under the MIT License. Please review the License file for details
All versions of laravel-mpesa with dependencies
illuminate/support Version ^5.0|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0
guzzlehttp/guzzle Version ^6.0|^7.0