PHP code example of dulabs / iak-api-php

1. Go to this page and download the library: Download dulabs/iak-api-php 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/ */

    

dulabs / iak-api-php example snippets


composer 


// import autoload
ass
use Dulabs\IakApiPHP\Services\IAKPrepaid;

$iakPrepaid = new IAKPrepaid([
  'userHp' => 'your-username',
  'apiKey' => 'your-api-key-depending-on-stage',
  'stage' => 'sandbox-or-production'
]);

$balanceResult = $iakPrepaid->checkBalance();
echo $balanceResult;


// import autoload
lass
use Dulabs\IakApiPHP\Services\IAKPostpaid;

$iakPostpaid = new IAKPostpaid([
  'userHp' => 'your-username',
  'apiKey' => 'your-api-key-depending-on-stage',
  'stage' => 'sandbox-or-production'
]);

$pricelistResult = $iakPostpaid->pricelist();
echo $pricelistResult;