1. Go to this page and download the library: Download aimtoget/aimtoget-agent-lib 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/ */
aimtoget / aimtoget-agent-lib example snippets
use Aimtoget\Agent\Config;
$config = new Config('--Secret key--', '--Wallet Pin--');
use Aimtoget\Agent\Account;
$account = new Account($config);
echo $account->getBalance();
use Aimtoget\Agent\Networks;
$networks = new Networks($config);
$all_networks = $networks->getAllNetworks();
use Aimtoget\Agent\Data;
$data = new Data($config);
//All Plans
$all = $data->getAllVariations();
//Retrieve plans for a certain network
$plans = $data->getNetworkVariations($network_id);
//Purchase 1GB of MTN data
$reference = $data->purchase([
'phone' => '09061668519',
'network_id' => 1,
'variation' => 'M1024'
]);
use Aimtoget\Agent\Services;
$services = new Services($config);
//Get all services
$all = $services->getAll();