Add full support for USPS DataMatrix
This commit is contained in:
parent
ce832f1120
commit
9f4aeca895
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
$trackinginfo;
|
$trackinginfo;
|
||||||
|
|
||||||
$code = $VARS["code"];
|
$code = urldecode($VARS["code"]);
|
||||||
$carrier = "";
|
$carrier = "";
|
||||||
if (!empty($VARS["carrier"])) {
|
if (!empty($VARS["carrier"])) {
|
||||||
$carrier = $VARS["carrier"];
|
$carrier = $VARS["carrier"];
|
||||||
|
@ -14,8 +14,12 @@ class Tracking_USPS_gsbarcode {
|
|||||||
$code = substr($code, 1);
|
$code = substr($code, 1);
|
||||||
}
|
}
|
||||||
$codeparts = explode("\x1D", $code);
|
$codeparts = explode("\x1D", $code);
|
||||||
|
if (count($codeparts) == 1) {
|
||||||
$realcode = $codeparts[1];
|
$realcode = $codeparts[0];
|
||||||
|
} else {
|
||||||
|
// Has routing portion, let's skip that
|
||||||
|
$realcode = $codeparts[1];
|
||||||
|
}
|
||||||
|
|
||||||
return Tracking::track($realcode, "usps");
|
return Tracking::track($realcode, "usps");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user