Logo Lanfrica
  • Home
  • Atlas
  • Insights
  • Docs
  • Sign in

© 2026 Lanfrica. All rights reserved. All copyrights of the resources shown on the Lanfrica website belong to the original copyright holders, unless explicitly stated otherwise.

tishmalo/laravel-mpesa

Domain:

digital infrastructure

Record type:

software
Creator:
tis
Host:
Laravel M-Pesa Lipa Na M-Pesa STK Push integration package # Laravel M-Pesa Package A Laravel package for integrating M-Pesa Lipa Na M-Pesa STK Push payments. ## Installation ### For Development/Testing (Package not yet published) 1. **Create the package structure in your Laravel project:** ```bash # In your Laravel project root mkdir -p packages/tish/laravel-mpesa ``` 2. **Copy all package files to `packages/tish/laravel-mpesa/`** (see file structure below) 3. **Add the local package repository to your main `composer.json`:** ```json { "repositories": [ { "type": "path", "url": "./packages/tish/laravel-mpesa" } ], "require": { "tish/laravel-mpesa": "dev-main" } } ``` 4. **Install the local package:** ```bash composer require tish/laravel-mpesa:dev-main ``` ### For Production (Once Published to Packagist) 1. **Install the package via Composer:** ```bash composer require tish/laravel-mpesa ``` 2. **Publish the config file and migrations:** ```bash php artisan vendor:publish --provider="Tish\LaravelMpesa\MpesaServiceProvider" php artisan migrate ``` 3. **Add your M-Pesa credentials to your `.env` file:** ```env MPESA_CONSUMER_KEY=your_consumer_key MPESA_CONSUMER_SECRET=your_consumer_secret MPESA_PASSKEY=your_passkey MPESA_BUSINESS_SHORT_CODE=your_shortcode MPESA_CALLBACK_URL=yourdomain.com MPESA_SANDBOX=true ``` 4. **Create listeners to handle payment events:** ```bash php artisan make:listener HandleSuccessfulPayment php artisan make:listener HandleFailedPayment ``` 5. **Register the event listeners in your `app/Providers/EventServiceProvider.php`:** ```php [ \App\Listeners\HandleSuccessfulPayment::class, ], PaymentFailed::class => [ \App\Listeners\HandleFailedPayment::class, ], ]; public function boot() { // } } ``` 6. **Implement your listeners:** **`app/Listeners/HandleSuccessfulPayment.php`:** ```php transaction; Log::info('Payment completed', [ 'account_reference' => $transaction->account_reference, 'receipt_number' => $transaction->mpesa_receipt_number, 'amount' => $transaction-> …

Visit

github.com

Languages

Lusengo

Licenses

MIT

Similar

tishmalo/mpesaKelvinEuclides/mpesa-laravelItsMurumba/laravel-mpesafelixmuhoro/laravel-mpesa-fortifyfelixmuhoro/laravel-mpesa-multitenancyfelixmuhoro/laravel-mpesa-api

tishmalo/mpesa

Mpesa package in laravel # Laravel M-Pesa Package A Laravel package for integrating M-Pesa Lipa Na

KelvinEuclides/mpesa-laravel

A Laravel package for the Vodacom M-Pesa Mozambique Open API, providing C2B, B2C, B2B, reversal and

ItsMurumba/laravel-mpesa

Laravel 5, 6, 7, 8, 9, 10, 11, 12 package for Mpesa Daraja API # Introduction This is a Laravel pac

felixmuhoro/laravel-mpesa-fortify

Fortify M-Pesa OTP integration for Laravel

felixmuhoro/laravel-mpesa-multitenancy

Multi-tenant M-Pesa manager for Laravel

felixmuhoro/laravel-mpesa-api

RESTful API for M-Pesa in Laravel