1. Go to this page and download the library: Download aftership/aftership-php-sdk 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/ */
aftership / aftership-php-sdk example snippets
$key = 'AFTERSHIP API KEY';
$couriers = new AfterShip\Couriers($key);
$trackings = new AfterShip\Trackings($key);
$last_check_point = new AfterShip\LastCheckPoint($key);
$key = 'AFTERSHIP API KEY';
$couriers = new AfterShip\Couriers($key);
$trackings = new AfterShip\Trackings($key);
$notifications = new AfterShip\Notifications($key);
$last_check_point = new AfterShip\LastCheckPoint($key);
$api_key = 'AFTERSHIP API KEY';
$api_secret = 'Your api secret'; // if the encryption_method = RSA, the api_secret is PEM private key
$encryption_method = 'AES or RSA';
$encryption_password = 'PEM pass phrase';
$key = ['api_key' => $api_key, 'api_secret' => $api_secret, 'encryption_method' => $encryption_method, 'encryption_password' => $encryption_password]
$couriers = new AfterShip\Couriers($key);
$trackings = new AfterShip\Trackings($key);
$last_check_point = new AfterShip\LastCheckPoint($key);
$api_key = 'AFTERSHIP API KEY';
$curl_opt = [CURLOPT_PROXY => 'http://example.com', 'CURLOPT_PROXYPORT' => '8080']
$couriers = new AfterShip\Couriers($key, null, $curl_opt);
$trackings = new AfterShip\Trackings($key, null, $curl_opt);
$last_check_point = new AfterShip\LastCheckPoint($key, null, $curl_opt);