Ejemplo n.º 1
0
    if ($request_all || $action == 'trackings_update_by_id') {
        p($trackings->update_by_id('53df4a90868a6df243b6efd8'), array('title' => 'T1', 'customer_name' => 'Sunny'));
    }
    echo '<input type="button" value="trackings_retrack" class="btn">' . 'retrack a tracking' . '</br>';
    if ($request_all || $action == 'trackings_retrack') {
        p($trackings->retrack('dhl', '2254095771'));
    }
    echo '<input type="button" value="trackings_retrack_by_id" class="btn">' . 'retrack a tracking by id' . '</br>';
    if ($request_all || $action == 'trackings_retrack_by_id') {
        p($trackings->retrack_by_id('53df4a90868a6df243b6efd8'));
    }
} catch (Exception $e) {
    echo $e->getMessage() . "<br>";
}
try {
    $last_check_point = new AfterShip\LastCheckPoint($api_key);
    echo '<h2>Last Check Point</h2>';
    echo '<input type="button" value="last_check_point_get" class="btn">' . 'get' . '</br>';
    if ($request_all || $action == 'last_check_point_get') {
        p($last_check_point->get('dhl', '2254095771'));
    }
    echo '<input type="button" value="last_check_point_get_by_id" class="btn">' . 'get by id' . '</br>';
    if ($request_all || $action == 'last_check_point_get_by_id') {
        p($last_check_point->get_by_id('53df4a90868a6df243b6efd8', array('fields' => 'city,zip,state')));
    }
} catch (Exception $e) {
    echo $e->getMessage() . "<br>";
}
echo '</form>';
echo '
</body>
Ejemplo n.º 2
0
if ($request_all || $action == 'trackings_retrack') {
    try {
        p($trackings->retrack('ups', '1ZV90R483A33906706'));
    } catch (Exception $e) {
        p($e);
    }
}
echo '<input type="button" value="trackings_retrack_by_id" class="btn">' . 'retrack a tracking by id' . '</br>';
if ($request_all || $action == 'trackings_retrack_by_id') {
    try {
        p($trackings->retrack_by_id('53df4a90868a6df243b6efd8'));
    } catch (Exception $e) {
        p($e);
    }
}
$last_check_point = new AfterShip\LastCheckPoint($api_key);
echo '<h2>Last Check Point</h2>';
echo '<input type="button" value="last_check_point_get" class="btn">' . 'get' . '</br>';
if ($request_all || $action == 'last_check_point_get') {
    try {
        p($last_check_point->get('ups', '1ZV90R483A33906706'));
    } catch (Exception $e) {
        p($e);
    }
}
echo '<input type="button" value="last_check_point_get_by_id" class="btn">' . 'get by id' . '</br>';
if ($request_all || $action == 'last_check_point_get_by_id') {
    try {
        p($last_check_point->get_by_id('53df4a90868a6df243b6efd8', array('fields' => 'city,zip,state')));
    } catch (Exception $e) {
        p($e);