PHP FedEX Tracking API Wrapper
, (*1)
This package is aimed at wrapping the FedEx Tracking service in a simple to use PHP Library. Feel free to contribute., (*2)
Table Of Content
- Requirements
-
Track Class
, (*3)
Requirements
This library uses PHP 5.3+., (*4)
To use the FedEx API, you have to request an access key from FedEx. For every request,
you will have to provide the Access Key, Password, Account Number and Meter Number., (*5)
, (*6)
Installation
It is recommended that you install the PHP FedEx Tracking API Wrapper library through composer. To do so,
add the following lines to your composer.json
file., (*7)
{
"require": {
"maxirus/fedex": "dev-master"
}
}
, (*8)
Track Class
The Track Class allows you to track a shipment using the FedEx Tracking API by simply providing a Tracking # or Order Tag number., (*9)
, (*10)
Example
$tracking = new FedEx\TrackService\Track($accessKey, $password, $acctNum, $meterNum);
try {
$shipment = $tracking->getByTrackingId('TRACKING NUMBER');
var_dump($shipment);
} catch (Exception $e) {
var_dump($e);
}
, (*11)
Parameters
Track parameters are:, (*12)
-
trackingNumber
The package’s tracking number.