Example #1
0
function submitshipmenttojet($oid, $jsondata)
{
    require_once 'HTTP/Request2.php';
    require_once 'AuthAPI.php';
    require_once 'OrdersAPI.php';
    //$LINE_BREAK = "\r\n";
    $LINE_BREAK = "<BR>";
    $authobj = new AuthAPI();
    $authinfo = new AuthInfo();
    $authinfo = $authobj->GetToken();
    $authobj->VerifyToken($authinfo);
    $orderobj = new OrdersAPI();
    $result = $orderobj->PutOrderShipment($authinfo, $oid, $jsondata);
    $strret = "";
    if (strlen($result) > 0) {
        $strret = $strret . "Shipment Error for Order : " . $oid . $LINE_BREAK;
        $strret = $strret . "Error is : " . $result . $LINE_BREAK;
    } else {
        $strret = $strret . "Shipment Order Success " . $LINE_BREAK;
    }
    return $strret;
}