
Mpesa Payment Gateway
Mpesa Payment Gateway Plugin for Botble CMS
Integrate Mpesa payment gateway into Botble CMS eCommerce systems with region-specific configurations for the Kenyan market.
Features
- Seamless Mpesa integration with transaction tracking
- CMS Theme Adaptive: Automatically adapts to your Botble CMS themes
- Region-specific configurations for Kenyan counties
- Sandbox and Live environment support with Till Number configuration
- Multi-currency support (KES)
- Customer-friendly checkout experience
- Comprehensive cleanup and removal tools
Installation
- Download and extract the plugin
- Copy to
platform/plugins/mpesa
directory - Admin Panel → Plugins → Activate "Mpesa Payment Gateway"
- Admin Panel → Settings → Payment Gateways → Configure
Configuration
Basic Setup
Navigate to Payment Methods and configure:

- Business Shortcode: Your Mpesa business code
- Till Number: For Live API transactions (required for production)
- Passkey: Mpesa API passkey
- Consumer Key & Secret: API credentials
- Payment Mode: Live/Sandbox
Theme Integration
The plugin is CMS theme adaptive, meaning it automatically integrates with your existing Botble CMS theme without requiring manual template modifications. The payment interface adapts to your theme's styling and layout.
Region-Specific Settings
Configure unique Mpesa settings per region:
Supported regions: Nairobi City, Kajiado, Kirinyaga, Machakos, Nakuru, and more.
Customer Experience
- Add products to cart
- Fill shipping information
- Select "Pay online via Mpesa"
- Review order total (KES)
- Complete payment via Mpesa redirect
Transaction Management

Monitor all transactions with:
- Real-time status tracking (Pending/Completed)
- Transaction details and amounts
- Customer information
- Payment dates and references
Requirements
- Botble CMS / Farmart Laravel eCommerce System
- Valid Mpesa Business Account
- Mpesa API credentials
- PHP 7.4+
Support
- Developer: Njovu Team
- Version: 0.1.1
- License: MIT
Quick Setup
# 1. Copy plugin files
cp -r mpesa-plugin platform/plugins/mpesa
# 2. Activate in admin panel
# 3. Configure Mpesa credentials
# 4. Set region-specific settings
# 5. Test with sandbox mode
Plugin Removal & Cleanup
The plugin includes comprehensive cleanup functionality to ensure clean removal:
Automatic Cleanup
When you run php artisan cms:plugin:remove mpesa
, the plugin automatically:
- Removes all M-Pesa settings from database
- Drops M-Pesa database tables
- Removes M-Pesa columns from orders table
- Deletes M-Pesa log files
- Clears cached configurations
Manual Cleanup
For thorough cleanup or troubleshooting, use these manual commands:
# Clean up all M-Pesa residuals with confirmation prompts
php artisan mpesa:cleanup-residuals
# Force cleanup without confirmation (useful for automation)
php artisan mpesa:cleanup-residuals --force
Note: The manual cleanup commands are particularly useful when:
- Switching between development and production environments
- Troubleshooting plugin issues
- Preparing for plugin updates
- Ensuring complete removal of plugin data
Support me ❤️
- PayPal ID: [email protected]