Add full support for USPS DataMatrix
parent
7ae708c55b
commit
ce832f1120
@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
class Tracking_USPS_gsbarcode {
|
||||
|
||||
/**
|
||||
*
|
||||
* @global type $SETTINGS
|
||||
* @param string $code
|
||||
* @return \TrackingInfo
|
||||
* @throws TrackingException
|
||||
*/
|
||||
public static function track(string $code): TrackingInfo {
|
||||
if (strpos($code, "\x1D") === 0) {
|
||||
$code = substr($code, 1);
|
||||
}
|
||||
$codeparts = explode("\x1D", $code);
|
||||
|
||||
$realcode = $codeparts[1];
|
||||
|
||||
return Tracking::track($realcode, "usps");
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue