maxirus/fedex

FedEx API wrapper

v0.0.1-beta 2015-04-13 16:24 UTC

This package is not auto-updated.

Last update: 2024-04-13 14:50:32 UTC


README

License Latest Stable Version Total Downloads

This package is aimed at wrapping the FedEx Tracking service in a simple to use PHP Library. Feel free to contribute.

Table Of Content

  1. Requirements
  2. Track Class

Requirements

This library uses PHP 5.3+.

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.

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.

{
    "require": {
        "maxirus/fedex": "dev-master"
    }
}

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.

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);
}

Parameters

Track parameters are:

  • trackingNumber The package’s tracking number.