PhpNuxBill Mpesa STK Push and C2B Offline

Published on Mar 25, 2025

PhpNuxBill Mpesa STK Push and C2B Offline
PREMIUM INSTANT

PREMIUM SCRIPT

One-time purchase
Ksh 4,500
Back to Marketplace
Ready to Use
Instant Download
Quality Assured
24/7 Support

Script Description

M-Pesa STK Push  Integration & C2B OFFLINE for PHPNUXBILL

Overview

Enhance your PHPNUXBILL billing system with seamless M-Pesa STK Push & C2B offline payment integration. This solution allows customers to make payments effortlessly by receiving a prompt on their mobile phones to enter their M-Pesa PIN and complete transactions securely. Additionally, it allows recording offline payments.

Key Features

  • Automated Payment Requests – Sends an STK Push request to the customer’s phone.
  • Real-Time Transaction Processing – Instantly confirms payments upon user approval.
  • Seamless Integration – Designed for quick and easy setup in PHPNUXBILL.
  • Secure and Reliable – Uses encrypted API requests to safeguard transactions.
  • User-Friendly Interface – Simple UI template included for easy interaction.

Installation Guide

Prerequisites

Before proceeding with the installation, ensure that:

  • Your PHP version is 5.6 or higher.
  • You have the CreateHotspotUser.php file in your PHPNUXBILL root directory. If not, contact support at 0113015674.

Step-by-Step Installation

Extract the provided folder, which contains the following files:

  • mpesa.php – Main integration file.
  • c2b.php – Handles customer-to-business (C2B) transactions.
  • initiatempesa.php – Triggers the M-Pesa STK Push.
  • mpesa.tpl – UI template file.
  • mpesa_transactions.php – Transaction management file.
  • mpesa_transactions.tpl – UI template for transaction configuration.
  • README.md – Documentation file.

Configure Your Credentials Open initiatempesa.php and enter your Safaricom API credentials:

  1. $consumerKey = ''; // Your M-Pesa Consumer Key $consumerSecret = ''; // Your M-Pesa Secret Key $BusinessShortCode = ''; // Your Business Short Code $Passkey = ''; // Your Lipa Na M-Pesa Passkey

File Placement Place the files into the appropriate directories within your PHPNUXBILL installation:

  • mpesa.php → Place inside the paymentgateway folder.
  • mpesa.tpl → Place inside the paymentgateway > ui folder.
  • initiatempesa.php → Place inside the plugin folder.
  • mpesa_transactions.php → Place inside the plugin folder.
  • mpesa_transactions.tpl → Place inside the plugin > ui folder.
  • c2b.php → Place inside the plugin folder.

Folder Structure After Installation

PHPNUXBILL/

PHPNUXBILL/
├── paymentgateway/
│   ├── mpesa.php
│   ├── ui/
│       ├── mpesa.tpl
├── plugin/
│   ├── initiatempesa.php
│   ├── mpesa_transactions.php
│   ├── c2b.php
│   ├── ui/
│       ├── mpesa_transactions.tpl
 

Additional Notes

  • Ensure proper file permissions to avoid permission issues.
  • Perform a test transaction to verify the integration.
  • Refer to PHPNUXBILL documentation for troubleshooting steps.

Best Practices

  • Use Version Control: Track modifications using Git or other versioning tools.
  • Backup Before Changes: Save a copy of your PHPNUXBILL installation before adding new files.

For assistance or troubleshooting, feel free to reach out. Upgrade your PHPNUXBILL system today with fast and secure M-Pesa STK Push payments!

Related Scripts

Discover more scripts you might like

View All Scripts
Airtel Money Plugin for PhPNuxbil
Script Instant Access
View Details
Pewa pay for PhPNuxBill
Script Instant Access
View Details
ioTec Plugin for PhPNuxbil
Script Instant Access
View Details
MTN PHPNUXBILL PLUGIN
Script Instant Access
View Details
Talksasa PHPNuxBill Gateway
Script Instant Access
View Details
SmartOlt for PhPNuxBill
Script Instant Access
View Details
CamPay Plugin for PhpNuxBill
Script Instant Access
View Details
KopoKopo Plugin for PhpNuxBill
Script Instant Access
View Details
PhpNuxBill Mpesa BANK STK Push
Script Instant Access
View Details
PhpNuxBill Mpesa Till STK Push
Script Instant Access
View Details
PhpNuxBill Hotspot Plugin
Script Instant Access
View Details