kibanda2025/mpesa-php-sdk ? reverse-engineered prompt
Reverse engineered prompt
Build me a small PHP SDK for the new Safaricom M Pesa REST APIs.
I want it to be easy for a PHP developer to install with composer, set a consumer key, consumer secret, and environment in a .env file, then call simple methods for common M Pesa actions like B2C, B2B, C2B, account balance, transaction status, and STK push payment requests. Please also include a way to check STK push status, and make it easy to work with callback URLs for confirmation, validation, and result responses.
It should feel simple to use in a normal project, and if it helps, include Laravel friendly setup too, like a service provider and alias. I also want helper methods to read callback JSON data and finish a transaction cleanly, including the option to reject it when validation fails.
If you need to look up current M Pesa docs online while building it, go ahead and do that.
Are you gonna build this?
make sure you review the code using coderabbit