Download the PHP package mrroot/orange-money-bundle without Composer
On this page you can find all versions of the php package mrroot/orange-money-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mrroot/orange-money-bundle
More information about mrroot/orange-money-bundle
Files in mrroot/orange-money-bundle
Package orange-money-bundle
Short Description Symfony bundle for Orange Money payment integration with complete webhook, callback and error handling support
License MIT
Homepage https://github.com/mrrootc/orange-money-bundle
Informations about the package orange-money-bundle
Orange Money Bundle for Symfony
Symfony bundle for Orange Money payment integration with complete webhook support, callbacks, and advanced error handling.
Features
- Orange Money payment initiation with comprehensive validation
- Transaction status verification with enhanced parameters
- Advanced webhook and notification handling with token validation
- Robust error handling with detailed logging
- Flexible configuration via environment variables
- OAuth2 support for secure API authentication
- Symfony compatibility 5.4, 6.x and 7.x
- Automatic data validation and sanitization
- Configurable callback URLs with security features
- Webhook spoofing protection via notification token validation
- Enhanced payment response handling with comprehensive data access
Bundle Architecture
File Structure
Flow Diagram
Installation
1. Installation via Composer
2. Bundle Registration
Add the bundle to config/bundles.php:
3. Configuration
Create the file config/packages/orange_money.yaml:
4. Environment Variables
Add these variables to your .env file:
Usage
Complete Controller Example
For a complete and detailed implementation example, see: Controller Example
Payment Initiation
Payment Status Verification
Webhook Handling with Security Validation
Transaction Status Verification (Optional)
Data Models
PaymentRequest
PaymentResponse
Security
Enhanced Webhook Validation
The bundle provides comprehensive webhook security:
Webhook Spoofing Protection
To prevent webhook spoofing attacks:
-
Store the notification token during payment initiation:
- Validate the token in webhook processing:
Error Handling
All errors are encapsulated in OrangeMoneyException:
Logging
The bundle uses Symfony's logging system:
Advanced Configuration
Endpoint Customization for Development or Production Environment
Complete Examples
Implementation examples are integrated directly into this documentation and include:
- Complete payment controller
- Callback handling
- Transaction status verification
- Webhook handling
Contributing
Contributions are welcome! Please:
- Fork the project
- Create a branch for your feature
- Commit your changes
- Push to the branch
- Open a Pull Request
License
This project is licensed under the MIT License. See the LICENSE file for more details.
Support
- Issues: GitHub Issues
- Email: [email protected]
Changelog
v1.1.0
- Enhanced webhook security with notification token validation
- Improved transaction status checking with required parameters (payToken, orderId, amount)
- Extended PaymentResponse model with notifToken and txnId properties
- Code quality improvements and consistency fixes
- Better error handling and validation
- Webhook spoofing protection implementation
v1.0.0
- First stable version
- Complete Orange Money API support
- Webhook handling
- Complete documentation
Developed with ❤️ by Abdoulaye CAMARA alias MrROOT
All versions of orange-money-bundle with dependencies
ext-ctype Version *
ext-curl Version *
ext-json Version *
symfony/config Version ^5.4|^6.0|^7.0
symfony/console Version ^5.4|^6.0|^7.0
symfony/dependency-injection Version ^5.4|^6.0|^7.0
symfony/framework-bundle Version ^5.4|^6.0|^7.0
symfony/http-client Version ^5.4|^6.0|^7.0
symfony/http-foundation Version ^5.4|^6.0|^7.0
symfony/http-kernel Version ^5.4|^6.0|^7.0
symfony/routing Version ^5.4|^6.0|^7.0
symfony/yaml Version ^5.4|^6.0|^7.0
psr/log Version ^1.0|^2.0|^3.0