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.

ongudidan/FOSSBilling-Mpesa-Payment-Adapter

Domain:

digital infrastructure

Record type:

softwaretools
Creator:
ong
Host:
# FOSSBilling M-Pesa Payment Adapter (Standalone) A premium, zero-dependency, single-file payment adapter for FOSSBilling that enables Safaricom M-Pesa STK Push (Lipa Na M-Pesa) payments. ## Features - **Zero Dependencies**: Fully self-contained. No `composer install` or external SDKs required. - **Premium UI**: Includes a loading overlay with a spinner and "Waiting for PIN" status feedback. - **Real-time Polling**: Automatically polls the payment status every 3 seconds and redirects the user immediately upon confirmation. - **Intelligent Phone Input**: Features a fixed `254` prefix and handles `07...`, `01...`, or `254...` formats automatically. - **Robust Error Handling**: Detects user cancellations on the phone and handles transaction timeouts gracefully. - **Wallet Recharge Fix**: Specifically handles "Add Funds" invoices to ensure the wallet balance increases correctly without double-accounting. - **Native IPN Routing**: Uses FOSSBilling's standard `ipn.php` for all communication—no external initiation scripts needed. ## Prerequisites - FOSSBilling version 0.5.x or higher. - PHP 8.2 or higher. - A publicly accessible FOSSBilling URL (M-Pesa cannot reach `localhost`). ## Installation 1. **Upload the Adapter**: Download Mpesa.php and place it in your FOSSBilling installation at: `library/Payment/Adapter/Mpesa.php` 2. **Logo (Optional)**: Place an M-Pesa logo (65x30px) in `data/assets/payment_gateways/mpesa.png`. ## Configuration 1. Log in to your FOSSBilling **Admin Panel**. 2. Navigate to **System** -> **Payment Gateways**. 3. Click the **New Payment Gateway** tab and select **M-Pesa**. 4. Enter your M-Pesa API credentials: - **Consumer Key / Secret**: From the Safaricom Daraja Portal. - **Business ShortCode**: Your Paybill or Till number. - **Passkey**: Lipa Na M-Pesa Online passkey (LNM Passkey). - **Test Mode**: Enable for Sandbox testing. ## Important Notes ### Callback URL Ensure your FOSSBilling **System URL** …

Visit

github.com

Languages

Lusengo

Similar

sivehost/fossbilling-pesapal-mpesaKeeganObonyo/Mpesa-Payment-AppMuindiStephen/mpesa-payment-integrationzeffa/dj-mpesa-paymentmunuhee/mpesa-payment-servicekiptoovincent2019/mpesa-payment-tracker

sivehost/fossbilling-pesapal-mpesa

FOSSBilling payment module for Pesapal MPESA integration ### **📌 FOSSBilling Mpesa Payment Module f

KeeganObonyo/Mpesa-Payment-App

A RESTFUL payment application with Mpesa REST APIs in python django framework, implementing all the

MuindiStephen/mpesa-payment-integration

Android MPESA - Linking Lipa na M-Pesa PAYMENT service with small and medium-sized businesses [C2B]

zeffa/dj-mpesa-payment

An Mpesa payment library for django framework # Mpesa Payment Lib An Mpesa payment library for djan

munuhee/mpesa-payment-service

This repository contains a RESTful microservice that integrates with the Daraja API for processing M

kiptoovincent2019/mpesa-payment-tracker

A simple and responsive React app for tracking M-Pesa payments in Kenya. Add payments, view totals,