Home » Php » php – Aramex shipment tracking api returns err02

php – Aramex shipment tracking api returns err02

Posted by: admin February 25, 2020 Leave a comment

Questions:

I want to integrate the shipment tracking api in our website and I’m using https://www.aramex.com/solutions-services/developers-solutions-center/apis and I am getting error ( ClientInfo – Invalid account information ). But information is correct.
PS : I am using following php script.

<?php
$soapClient = new SoapClient('Tracking.wsdl');

$params = array(
'ClientInfo' =>array( 
                 'AccountCountryCode' => 'JO',
                 'AccountEntity' => 'AMM',
                 'AccountNumber' => 'XXXXXX', // replace with our
                 'AccountPin' => 'XXXXXX',
                 'UserName' => '[email protected]',
                 'Password' => 'XXXXXXXXXX',
                 'Version' => 'v1.0',
                 'Source' => null
                ),
'Transaction' => array(
                    'Reference1'            => '001' 
                ),
'Shipments' => array(
                'XXXXXXXXXXXXXXXXXXXX'
            )
);

// calling the method and printing results
try {
    $auth_call = $soapClient->TrackShipments($params);
    echo "<pre>"; print_r($auth_call); die;
} catch (SoapFault $fault) {
    die('Error : ' . $fault->faultstring);
}
?>

Result

Screenshot result

How to&Answers: