Skip to content

Instantly share code, notes, and snippets.

@cgsmith
Created July 25, 2013 20:45
Show Gist options
  • Save cgsmith/6083595 to your computer and use it in GitHub Desktop.
Save cgsmith/6083595 to your computer and use it in GitHub Desktop.
<?php
$proxy = new SoapClient($host.$path);
$session = $proxy->login($user,$pass);
try {
$order = $proxy->salesOrderInfo($session,$increment_id,array(),'Test Addition',1);
try {
$shipmentId = $proxy->salesOrderShipmentCreate($session,$increment_id);
try {
$proxy->salesOrderShipmentAddTrack($session, $shipmentId, $carrier, 'FedEx Ground', $tracking_id);
echo 'Tracking created for '.$increment_id.'<br>';
} catch (Exception $e) {
echo $e->getMessage() . '<br>';
}
}catch (Exception $e) {
echo $e->getMessage() .'<br>';
}
} catch (Exception $e) {
echo $e->getMessage().'<br>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment