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.

me12free/laravel-mpesa-stkpush-sandbox

Domain:

digital infrastructure

Record type:

software
Creator:
me1
Host:
# Laravel M-Pesa STK Push Sandbox A modern, open-source Laravel package for integrating M-Pesa STK Push (sandbox/testing) with best practices. Focused on developer experience, security, and easy integration. --- ## Table of Contents - Requirements - Quick Start - Configuration - Usage Example - Callback Handling - Testing - Contributing & Feedback - Support - Author - License --- ## Requirements - PHP >= 8.0 - Laravel >= 9.0 --- ## Quick Start ```bash composer require me12free/laravel-mpesa-stkpush-sandbox ``` ### Publish Config & Migration ```bash php artisan vendor:publish --provider="MpesaSandbox\MpesaSandboxServiceProvider" --tag=config php artisan vendor:publish --provider="MpesaSandbox\MpesaSandboxServiceProvider" --tag=migrations ``` --- ## Configuration Add to your `.env`: ```env MPESA_CONSUMER_KEY=your_sandbox_consumer_key MPESA_CONSUMER_SECRET=your_sandbox_consumer_secret MPESA_SHORTCODE=174379 MPESA_PASSKEY=your_sandbox_passkey MPESA_CALLBACK_URL=your-ngrok-url MPESA_CALLBACK_SECRET=your_shared_secret ``` --- ## Usage Example ```php use MpesaSandbox\MpesaSandbox; $mpesa = app(MpesaSandbox::class); $response = $mpesa->initiateStkPush('2547XXXXXXXX', 10); ``` --- ## Callback Handling See `README-callback.md` for a full example controller and route. **Security:** Always verify the shared secret in your callback controller: ```php if ($request->query('secret') !== env('MPESA_CALLBACK_SECRET')) { abort(403, 'Invalid secret'); } ``` --- ## Testing This package uses Pest and Orchestra Testbench for isolated, modern package testing. ```bash composer install vendor/bin/pest ``` --- ## Contributing & Feedback Pull requests are welcome! Please see the CONTRIBUTING.md guide (or open an issue for questions). - **Star this repo:** If you like this package, please star it on GitHub to show your support! - **Rate on Packagist:** Leave a rating or review on Packagist if you find it use …

Visit

github.com

Languages

Lusengo

Licenses

MIT

Similar

me12free/mpesa-laravel-guideKelvinEuclides/mpesa-laravelItsMurumba/laravel-mpesatishmalo/laravel-mpesafelixmuhoro/laravel-mpesa-telegramfelixmuhoro/laravel-mpesa-b2b

me12free/mpesa-laravel-guide

# Laravel M-Pesa STK Push Integration Guide A comprehensive, modern, and reusable guide for integra

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

tishmalo/laravel-mpesa

Laravel M-Pesa Lipa Na M-Pesa STK Push integration package # Laravel M-Pesa Package A Laravel pack

felixmuhoro/laravel-mpesa-telegram

Telegram alerts for M-Pesa payments

felixmuhoro/laravel-mpesa-b2b

M-Pesa B2B payment integration for Laravel