Download the PHP package mak8tech/dpo-payments without Composer
On this page you can find all versions of the php package mak8tech/dpo-payments. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mak8tech/dpo-payments
More information about mak8tech/dpo-payments
Files in mak8tech/dpo-payments
Package dpo-payments
Short Description Laravel 12 package for DPO Group payment gateway integration with support for African markets
License MIT
Informations about the package dpo-payments
Mak8Tech DPO Payment Package for Laravel 12
A comprehensive Laravel 12 package for integrating DPO (Direct Pay Online) payment gateway with support for African markets, focusing primarily on Zambia but with configurable support for 15+ African countries.
Features
- ✅ One-time Payments: Process single transactions with card and mobile money options
- ✅ Recurring Subscriptions: Monthly, quarterly, and yearly subscription management
- ✅ Multi-Country Support: Pre-configured for 15+ African countries
- ✅ Multiple Payment Methods: Credit/debit cards and country-specific mobile money
- ✅ Admin Dashboard: Blade components for transaction and subscription management
- ✅ React Components: Ready-to-use components for Next.js integration
- ✅ Comprehensive Logging: Track all payment activities
- ✅ Event System: Hook into payment lifecycle events
- ✅ Refunds & Cancellations: Full payment management capabilities
Supported Countries
| Country | Currency | Mobile Money | Recurring |
|---|---|---|---|
| Zambia | ZMW | Airtel Money, MTN MoMo, Zamtel Kwacha | ✅ |
| Kenya | KES | M-Pesa, Airtel Money | ✅ |
| Tanzania | TZS | M-Pesa, Airtel Money, Tigo Pesa, HaloPesa | ✅ |
| Uganda | UGX | MTN MoMo, Airtel Money | ✅ |
| South Africa | ZAR | Card payments only | ✅ |
| Rwanda | RWF | MTN MoMo, Airtel Money | ✅ |
| Nigeria | NGN | Card payments only | ✅ |
| Ghana | GHS | MTN MoMo, Vodafone Cash, AirtelTigo Money | ✅ |
| Zimbabwe | USD | EcoCash, OneMoney | ✅ |
| And 6+ more countries...
Installation
1. Install via Composer
2. Publish Configuration
3. Configure Environment Variables
Add to your .env file:
4. Run Migrations
5. (Optional) Publish Assets
For Blade views:
For React components:
Quick Start
Creating a Payment
Creating a Subscription
Handling Callbacks
The package automatically handles callbacks at /dpo/callback. You can listen to events:
Blade Components
Payment Form Component
Transaction Table Component
Subscription Manager Component
React Components for Next.js
Installation in Next.js
-
Copy the React components to your Next.js project:
- Install required dependencies:
Usage in Next.js
API Endpoints
Payments
POST /api/dpo/payments- Create paymentGET /api/dpo/payments/{reference}/status- Get payment statusPOST /api/dpo/payments/{reference}/refund- Process refundPOST /api/dpo/payments/{reference}/cancel- Cancel payment
Subscriptions
POST /api/dpo/subscriptions- Create subscriptionGET /api/dpo/subscriptions/{reference}- Get subscription detailsPUT /api/dpo/subscriptions/{reference}- Update subscriptionPOST /api/dpo/subscriptions/{reference}/cancel- Cancel subscriptionPOST /api/dpo/subscriptions/{reference}/pause- Pause subscriptionPOST /api/dpo/subscriptions/{reference}/resume- Resume subscription
Utility
GET /api/dpo/countries- Get supported countries
Admin Dashboard
Access the admin dashboard at /dpo/admin (requires authentication).
Features:
- Transaction management with filtering and search
- Subscription overview and management
- Revenue reports by country and currency
- Payment success/failure analytics
- Export capabilities
Artisan Commands
Check DPO Status
Process Due Subscriptions
Set up a cron job for automatic processing:
Testing
Running Tests
Test Mode
Enable test mode in your .env:
This will use DPO's sandbox environment for testing.
Advanced Usage
Custom Payment Flow
Multi-Currency Operations
Webhook Security
The package automatically validates webhook callbacks. You can add additional IP whitelisting:
Troubleshooting
Common Issues
-
Token Creation Failed
- Verify your company token is correct
- Check if test mode matches your DPO account type
- Ensure amount is greater than 0
-
Recurring Payments Not Working
- Confirm the country supports recurring payments
- Verify PaySubs is enabled on your DPO account
- Check subscription start date is in the future
- Mobile Money Not Appearing
- Ensure the selected country supports mobile money
- Verify mobile money is enabled for your merchant account
- Check that the currency matches the country
Debug Mode
Enable detailed logging:
Security
- Never expose your company token in frontend code
- Always validate webhook callbacks
- Use HTTPS in production
- Implement rate limiting on payment endpoints
- Regular security updates
Support
For issues and questions:
- GitHub Issues: github.com/mak8tech/dpo-payments
- Email: [email protected]
- Documentation: docs.mak8tech.com/dpo-payments
License
This package is open-sourced software licensed under the MIT license.
Credits
- Developed by Mak8Tech
- DPO Group for payment gateway services
- Laravel community for framework support
Changelog
v0.0.1 (2025-10-05)
- Initial release
- Support for 15+ African countries
- One-time and recurring payments
- Admin dashboard
- React components for Next.js
- Comprehensive test suite
All versions of dpo-payments with dependencies
laravel/framework Version ^12.0
guzzlehttp/guzzle Version ^7.10
nesbot/carbon Version ^3.10