- What does the combindma/cmi-payment package do?
- It is a Laravel package that lets your application communicate with CMI, Morocco's payment platform. It provides a clean, configurable API for initiating payments, redirecting customers to the gateway, and processing the callbacks CMI sends back to your app. The goal is to remove the boilerplate normally required to wire a Laravel app into a hosted payment page.
- How do I install combindma/cmi-payment with Composer?
- Install it with composer require combindma/cmi-payment and let Laravel's package discovery register the service provider automatically. After installing, publish the package configuration so you can supply your CMI merchant credentials and environment settings. Always check the README for any post-install steps specific to the version you pull in.
- Which Laravel versions does combindma/cmi-payment support?
- The 1.1.0 release adds Laravel 11 support and drops Laravel 9. Laravel 10 support should be confirmed against the composer constraints before you upgrade, since the release is framed as a framework-alignment change. If you are on Laravel 9, stay on the previous package line or upgrade the framework first.
- Can I still use this package on Laravel 9?
- Not with version 1.1.0, which drops Laravel 9 from its supported matrix. Laravel 9 applications should pin the package to the last compatible release and treat any further updates as unavailable on that line. Plan a coordinated Laravel upgrade if you want to keep receiving package updates.
- What changed in version 1.1.0 and is it a breaking change?
- Version 1.1.0 adds Laravel 11 support and removes Laravel 9, which is effectively a breaking change for anyone still on Laravel 9. For projects on Laravel 10 or 11 the change is a routine ecosystem alignment with little expected code impact. Review the release notes for any documented changes beyond the framework version constraint.
- How do I configure my CMI merchant credentials?
- After publishing the package configuration, you set your CMI merchant identifier, keys, and gateway endpoint or environment values there. Keep these values out of version control and load them from environment variables instead. The configuration file also controls the URLs CMI should redirect to after a successful or failed payment.
- How do I handle the callback CMI sends after a payment?
- The package gives you a route and handler for the callback CMI posts back after the customer completes or abandons the payment page. You should verify the returned data against your stored order before marking it paid, and never trust a client-side redirect alone as proof of payment. Respond with the acknowledgement CMI expects so the gateway does not retry unnecessarily.
- How can I test CMI payments without charging real customers?
- CMI provides a test or sandbox environment that you configure through the package settings instead of your live credentials. Run through success, failure, and cancellation flows in staging to confirm your redirect and callback handling behaves correctly. Also test replayed or duplicate callbacks, since gateways can retry and your handler should be idempotent.
- What should I check before rolling this package out to production?
- Run composer update in a clean environment to catch resolution conflicts, then smoke test every integration point: payment initiation, redirect, callback verification, and failure handling. Confirm your Laravel version matches the package's supported matrix, especially if you use several services on different framework versions. Have a rollback plan to the prior package version in case runtime errors appear.
- Is combindma/cmi-payment actively maintained and what are the alternatives?
- The 1.1.0 release shows the package is being kept in step with current Laravel versions, but you should check the repository for recent commits and open issues before adopting it. There is no large ecosystem of CMI integrations for Laravel, so alternatives are mostly thin custom integrations against CMI's own documentation. If you need long-term stability on an older Laravel version, pinning a known-good release is the safer route.