1. Go to this page and download the library: Download akika/laravel-momo library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
akika / laravel-momo example snippets
use Akika\\MoMo\\Facades\\MoMo;
use Akika\\MoMo\\Enums\\Currency;
// transfer 10.00 UGX to a payee MSISDN
$referenceId = MoMo::disbursement()->transfer(
10.00,
Currency::UgandaShilling,
externalId: 'your-unique-external-id',
payeeMsisdn: '25677XXXXXXX',
payerMessage: 'Payment for invoice #123',
payeeNote: 'Thanks',
);
// $referenceId is the transfer reference you can use to query status
use Akika\\MoMo\\MoMo;
use Akika\\MoMo\\Facades\\MoMo as MoMoFacade;
$client = new MoMo();
$client->createApiUser();
$apiKey = $client->createApiKey();
use Akika\\MoMo\\Facades\\MoMo;
MoMo::createApiUser();
$apiKey = MoMo::createApiKey();
use Akika\MoMo\Facades\MoMo;
$balance = MoMo::disbursement()->getAccountBalance();
// Example result:
// [
// 'availableBalance' => '123.45',
// 'currency' => 'EUR',
// ]
use Akika\MoMo\MoMo;
$client = new MoMo();
$balance = $client->disbursement()->getAccountBalance();