Skip to content
/ TNT-API Public

Send parcel information to TNT for accurate rate and transit time information.

License

Notifications You must be signed in to change notification settings

ptrcko/TNT-API

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TNT-API

Send parcel information to TNT for accurate rate and transit time information.

Contact TNT on 1300 851 131 to get a username and password for the API

Add this information to the TntConfig.ini file. I recommend keeping this outside the root directory for your website and using approprite file permissions

Include this class in your application. Examples of calling the code are :

include 'TntEnquiry.php';

$enquiry = new TntEnquiry();


var_dump($enquiry->setShipDate("2015-08-19"));


$deliveryAddress = array(
    'suburb'=>'Brighton',
    'postCode'=>'3186',
    'state'=>'vic'
);
$enquiry->setDeliveryAddress($deliveryAddress);
$dom = $enquiry->createBaseXML();

$dom = $enquiry->addItem($dom,2,5,22,33,10);

$dom = $dom->saveXML();
$output = $enquiry->send($dom);

var_dump($output);

I put this together over about 12 hours. I would appriciate any feedback or comments on the code and how to improve it.

About

Send parcel information to TNT for accurate rate and transit time information.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages