PHP code example of gdinko / acs

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

    

gdinko / acs example snippets


Acs::setTimeout(99);

/**
 * You can call all methods from the API like this , there is no need
 * to pass company data every time. The data is injected automaticaly
 * on every request
 **/

dd(Acs::ACS_Address_Validation([
    'Address' => 'Address ...'
]));

dd(Acs::ACS_Trackingsummary([
    'Voucher_No' => '999999999'
]));

CarrierAcsTracking
CarrierAcsApiStatus

CarrierAcsTrackingEvent

Event::listen(function (CarrierAcsTrackingEvent $event) {
    echo $event->account;
    dd($event->tracking);
});

use Gdinko\Acs\Commands\TrackCarrierAcsBase;

class TrackCarrierAcsSetup extends TrackCarrierAcsBase
{
    protected function setup()
    {
        //define parcel selection logic here
        // $this->parcels = [];
    }
}
bash
php artisan migrate
bash
php artisan vendor:publish --tag=acs-config
bash
php artisan vendor:publish --tag=acs-migrations
bash
php artisan vendor:publish --tag=acs-models
bash
php artisan vendor:publish --tag=acs-commands
bash
php artisan make:command TrackCarrierAcs
bash
php artisan acs:track