Last active
July 31, 2023 14:03
-
-
Save levizwannah/7443c6f12dd744cd9e69d706caa4b12d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// initialize Mpesa | |
// ...autoloading | |
$mpesa = Mpesa::new()->configure([ | |
"key" => "consumer key", | |
"secret" => "consumer secret", | |
"code" => "business short code", | |
"till" => "business till if necessary", | |
"initiator" => "initiator name", | |
"credential" => "security credential" | |
]); | |
$reversal = $mpesa->reversal(); | |
// or | |
$mpesa = Mpesa::new()->configure([ | |
"key" => "consumer key", | |
"secret" => "consumer secret", | |
"code" => "business short code", | |
"till" => "till number if necessary" | |
]); | |
$reversal = $mpesa->reversal(); | |
$reversal->initiator("initiator name") | |
->credential("security credential"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment