bmatovu / laravel-airtel-money
Laravel Airtel Money API Integration
Installs: 3
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/bmatovu/laravel-airtel-money
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.5
- illuminate/console: ^10.0|^11.0|^12.0
- illuminate/container: ^10.0|^11.0|^12.0
- illuminate/contracts: ^10.0|^11.0|^12.0
- illuminate/database: ^10.0|^11.0|^12.0
- illuminate/support: ^10.0|^11.0|^12.0
- nesbot/carbon: ^2.3|^3.0
- psr/http-message: ^2.0
- ramsey/uuid: ^4.7
Requires (Dev)
- code-lts/doctum: ^5.5
- laravel/framework: ^10.0|^11.0|^12.0
- laravel/pint: ^1.20
- mockery/mockery: ^1.5
- orchestra/testbench: ^9.0|^10.0|^11.0
- pestphp/pest: ^2.0|^3.0|^4.0
- phpstan/phpstan-phpunit: ^2.0
- phpunit/phpunit: ^10.0|^11.0|^12.0
README
Prerequisites
You will need the following to get started with your integration:
-
Create an
applicationon the Airtel Money Developer Portal. -
Write to the Airtel Money Support Team to get your application approved, here.
Note: Your application will not work until it’s approved. You can confirm your app's status in the portal.
| Status | Meaning |
|---|---|
| NA | Not Approved |
| Partially Approved | Approved for UAT |
| Approved | Approved for PROD |
Getting Started
Installation
composer require bmatovu/laravel-airtel-money
Publishables
php artisan vendor:publish --provider="Bmatovu\AirtelMoney\AirtelMoneyServiceProvider"
Database Migrations
php artisan migrate
Authentication & PIN
Set Credentials
Retrieve your client_id and client_secret from Key Management
php artisan airtel-money:auth
Set Disbursement PIN
php artisan airtel-money:pin
Usage
Authentication
use Bmatovu\AirtelMoney\Facades\Authentication; $token = Authentication::getToken();
Collections
use Bmatovu\AirtelMoney\Facades\Collection; $transaction = Collection::receive($phoneNumber, $amount); $transaction = Collection::refund($airtelMoneyId); $transaction = Collection::getTransaction($transactionId); $balance = Collection::getBalance(); $user = Collection::getUser($phoneNumber);
Disbursement
use Bmatovu\AirtelMoney\Facades\Disbursement; $transaction = Disbursement::send($phoneNumber, $amount); $transaction = Disbursement::getTransaction($transactionId); $user = Disbursement::getUser($phoneNumber);
Testing
composer test
Credits
License
This package is open-source software licensed under the MIT License.