PHP code example of javaabu / customs-api

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

    

javaabu / customs-api example snippets


// config/app.php
'providers' => [
    ...
    Javaabu\Customs\CustomsServiceProvider::class,
],

// config/app.php
'aliases' => [
    ...
    'Customs' => Javaabu\Customs\Facades\Customs::class,
],

// config/services.php
...
'customs' => [
    'username' => env('CUSTOMS_USERNAME'), // Customs API username 
    'password' => env('CUSTOMS_PASSWORD'), // Customs API password 
    'url' => env('CUSTOMS_API_URL'), // optional, use only if you need to override the default,
                                  // defaults to https://api.customs.gov.mv/api/
],
...
 php
$customs = App::make('customs');
$entity = $customs->getTraderByMedNumber('C-0933/2017');
 php
Customs::getTraderByMedNumber($business_registration_number);
Customs::getTraderByCNumber($impoter_exporter_number);