This file contains 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", |
This file contains 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", |
This file contains 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
/*---------------------------------- | |
| Do OpenScript Configurations Here | |
|---------------------------------- | |
*/ | |
/**---------------------------------- | |
* Set the default route path here | |
* Every route will be prefixed by | |
* this path. | |
* ---------------------------------- |
This file contains 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 | |
require(__DIR__ . "/vendor/autoload.php"); | |
use LeviZwannah\MpesaSdk\Mpesa; | |
$config = [ | |
"key" => "consumer Key", | |
"secret" => "consumer secret", | |
"code" => "business short code", | |
"passkey" => "passkey for stk push" |
This file contains 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 | |
require(__DIR__ . "/vendor/autoload.php"); | |
// or read getting started if the vendor is not available | |
use LeviZwannah\MpesaSdk\Mpesa; | |
$config = [ | |
"key" => "consumer Key", | |
"secret" => "consumer secret", |
This file contains 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 | |
require(__DIR__ . "/vendor/autoload.php"); | |
// or read getting started if the vendor is not available | |
use LeviZwannah\MpesaSdk\Mpesa; | |
$config = [ | |
"key" => "consumer Key", | |
"secret" => "consumer secret", |
This file contains 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 | |
require_once(__DIR__ . "/vendor/autoload.php"); | |
use LeviZwannah\MpesaSdk\Mpesa; | |
$config = [ | |
"key" => "Consumer Key", // consumer key | |
"secret" => "Consumer Secret", // consumer secret | |
"code" => "123456", // business short code | |
"env" => "live" //set environment to live or sandbox | |
]; |
This file contains 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 | |
require(__DIR__ . "/vendor/autoload.php"); | |
use LeviZwannah\MpesaSdk\Mpesa; | |
//default configs | |
$config = [ | |
"key" => "Consumer Key", | |
"secret" => "Consumer Secret", | |
"code" => " business short code" | |
]; |
This file contains 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 | |
require(__DIR__ . "/vendor/autoload.php"); | |
use LeviZwannah\MpesaSdk\Mpesa; | |
$config = [ | |
"key" => "Consumer Key", | |
"secret" => "Consumer Secret", | |
"code" => "Business short code", | |
]; | |