PHP code example of camoo / airtime

1. Go to this page and download the library: Download camoo/airtime 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/ */

    

camoo / airtime example snippets



// set api_key and secret_key
$oAirtime = new \CAMOO\Airtime\Airtime('592595095gh57', '4e32da5979879b89479847b9798479494984');

// receiver recipient
$oAirtime->destination_msisdn='237671234567';
#Retrieve MsisdnInfo
$ohMsisdnInfo = $oAirtime->getMsisdnInfo();

  $sTopupList = $ohMsisdnInfo->msisdn_info->topup_list;
  // your prices for each topup product
  $sWholeSalePriceList = $ohMsisdnInfo->msisdn_info->wholesale_price_list;

// airtime from
$oAirtime->msisdn= '237661562859';
// airtime product
$oAirtime->topup=100;
var_dump($oAirtime->send());