Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560 [2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85 [3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50 [4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13 [5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
| Server IP : 94.177.8.99 / Your IP : 216.73.217.165 Web Server : Apache/2.4.58 (Ubuntu) System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/theyoungdesigners_com/modules/freightUsps/ |
Upload File : |
<?php
namespace modules\freightUsps;
// https://developer.usps.com/api never worked. Uses postcalc.usps.com instead
class main extends \moduleMain {
use \modules\input\traits {
\modules\input\traits::__construct as __ConstructInput;
}
use \modules\output\traits {
\modules\output\traits::__construct as __ConstructOutput;
}
private $identifier;
public function __construct() {
parent::__construct(__DIR__);
$this->__ConstructInput();
$this->__ConstructOutput();
$this->identifier = 'usps';
}
// class must be listed in a 'depends' setting to be activated
public function Activate() {
hook_add('freight.calculate', [$this, '__get_calculate']); // calculate the freight cost for the given service(s) - USPS api does not work
hook_add('tracking.validate', [$this, '__tracking_validate']); // do we recognize this tracking number? (is it in the correct format, not "does it exist")
}
private function _addRate(&$services, $rateOption) {
unset($rateOption['extraServices']);
$rate = $rateOption['rates'][0];
$rate_item = $rate['SKU'];
if (substr($rate_item, 3, 1) == 'E') { // Envelope - drop it
return;
}
$svc_id = substr(md5($rate_item . $this->identifier), 0, 8);
$services[] = [
'source' => $this->identifier,
'key' => $svc_id,
'value' => $rate_item,
'caption' => $rate['productName'],
'cost' => $rate['price'],
];
}
// ["DeliveryDay"]=> string(22) "Thu, Apr 10 by 6:00 PM"
// ["DeliveryDay"]=> string(22) "Sat, Apr 12"
private function _asService($service, $shipdate) {
$rate_item = $this->identifier . '_' . $service['serviceid'];
$svc_id = substr(md5($rate_item . $this->identifier), 0, 8);
$delivery = $service['DeliveryDay'];
if (($p = strpos($delivery, ' by ')) !== FALSE) {
$delivery = substr($delivery, 0, $p);
}
$cost = floatval(str_replace('$', '', $service['RetailPrice']));
if ($cost < 0.05) return FALSE;
$node = [
'source' => $this->identifier,
'key' => $svc_id,
'value' => $rate_item,
'caption' => $service['title'],
'cost' => $cost,
'shipdate' => $shipdate,
'estimate' => $this->getEstimatedDelivery($delivery),
'j' => $delivery,
];
return $node;
}
private function getEstimatedDelivery($text) {
// drop dow
$dow = preg_match('~sun|mon|tue|wed|thu|fri|sat~i', $text, $match) ? $match[0] : '';
if ($dow != '') $text = str_replace($dow, '', $text);
if (trim($text) == '') return FALSE;
// get month
$month = 0;
$months = ['jan', 'feb', 'mar', 'apr', 'may', 'jun', 'jul', 'aug', 'sep', 'oct', 'nov', 'dec'];
foreach($months as $index => $name) {
if (($p = stripos($text, $name)) !== FALSE) {
$month = $index + 1;
$text = substr($text, 0, $p) . substr($text, $p + 3);
break;
}
}
// get day
$day = preg_match('~\d+~', $text, $match) ? $match[0] : '';
// assume this year, unless month < current month => next year
[$year, $mm] = explode(',', date('Y,n'));
if ($month > 0 && $month < $mm) $year++;
return gmmktime(12, 0, 0, $month, $day, $year);
}
// https://developer.usps.com/api/99
public function __get_calculate($params) {
if (empty($params->originZip)) {
return $params->status = 'error: no origin zip';
}
if (!isset($params->services)) $params->services = [];
// $params->services = $this->getServices();
$oz = $params->weight / 1000 * 35.274;
if ($oz < 1) $oz = 1;
$oz = ceil($oz);
if ($oz > 1170) { // max is 1170 oz (70lb);
return $params->status = 'error: too heavy - max weight is 70lb';
}
// https://postcalc.usps.com/Retail/GetMailServices?
$shipdate = gmdate('n/j/Y', $params->shipdate);
$payload = [
'countryID' => 0,
'countryCode' => $params->targetCtry,
'origin' => $params->originZip,
'isOrigMil' => 'False',
'destination' => $params->targetZip,
'isDestMil' => 'False',
'shippingDate' => "$shipdate 12:00:00 AM",
'shippingTime' => '16:59',
'itemValue' => '',
'dayOldPoultry' => 'False',
'liveAnimals' => 'False',
'groundTransportation' => 'False',
'nonnegotiableDocument' => 'False',
'crematedRemains' => 'False',
'mailShapeAndSize' => 'Package',
'hazmat' => 'False',
'nonmachinable' => 'False',
'isEmbedded' => 'False',
'pounds' => '',
'ounces' => $oz,
'length' => 0,
'height' => 0,
'width' => 0,
'girth' => 0,
'shape' => 'Rectangular',
'_' => time() * 1000,
];
switch($param->lithium) {
case 3481:
$payload['hazmat'] = 'True';
break;
case 3480:
$payload['hazmat'] = 'True';
break;
}
if ($params->targetCtry != 'US') {
} else {
if (($p = strpos($params->targetZip, '-')) !== FALSE) { // only accepts 5-digit postcodes
$payload['destination'] = substr($params->targetZip, 0, $p);
}
}
$n = new \CurlObject;
$body = $n ->url('https://postcalc.usps.com/Retail/GetMailServices?' . $n->assembleQueryString($payload) )
->Redirect(TRUE)
->Execute()
->Body();
$json = json_decode($body, TRUE);
foreach($json['Page']['MailServices'] as $mailservice) {
$id = $mailservice['PostageServiceID'];
if ($id == 12 || $id == 13 || $id == 14 || $id == 76) continue; // flat rate boxes, media
foreach($mailservice['DeliveryOptions'] as $option) {
if ($option['Name'] == 'Normal Delivery Time') {
$normal = $option;
$normal['title'] = $mailservice['Title'];
$normal['serviceid'] = $mailservice['PostageServiceID'];
$entry = $this->_asService($normal, $params->shipdate);
if (is_array($entry)) $params->services[] = $entry;
break;
}
}
}
}
public function __tracking_validate(&$result, $tracking_number) {
if (!is_string($result)) {
$tracking_number = str_replace(' ', '', $tracking_number);
if (preg_match('~\b([A-Z]{2}\d{9}[A-Z]{2}|(420\d{9}(9[2345])?)?\d{20}|(420\d{5})?(9[12345])?(\d{24}|\d{20})|82\d{8})\b~', $tracking_number)) {
$result = new \StdClass;
$result->carrier = $this->identifier;
$result->tracking = $tracking_number;
}
}
}
// canada: https://postcalc.usps.com/Calculator/ShapeAndSize?country=10054&ccode=CA&omil=False&dmil=False&retail=False&mdt=4%2F10%2F2025&mdz=16%3A59&m=0&dvi=%24%20100&hscode=False
// https://postcalc.usps.com/Calculator/ShapeAndSize?country=10054&ccode=CA&omil=False&dmil=False&retail=False&mdt=4%2F8%2F2025&mdz=16%3A59&m=0&dvi=%24%20123.45&hscode=False
// second step -weight (6lb)
// https://postcalc.usps.com/Calculator/PostalCode?country=10054&ccode=CA&omil=False&dmil=False&retail=False&mdt=4%2F8%2F2025&mdz=16%3A59&m=6&dvi=%24%20123.45&hscode=False&p=6
// third step: from/to postcode
// https://postcalc.usps.com/Calculator/MailServices?country=10054&ccode=CA&oz=02343&omil=False&dz=E9G&dmil=False&retail=False&mdt=4%2F8%2F2025&mdz=16%3A59&m=6&dvi=%24%20123.45&hscode=False&p=6
// USA
// hazardous: https://postcalc.usps.com/Calculator/ShapeAndSize?country=0&ccode=US&oz=02343&omil=False&dz=90210&dmil=False&retail=False&mdt=4%2F8%2F2025&mdz=16%3A59&m=0&ct2=True&hscode=False
// https://postcalc.usps.com/Calculator/MailServices?country=0&ccode=US&oz=02343&omil=False&dz=90210&dmil=False&retail=False&mdt=4%2F8%2F2025&mdz=16%3A59&m=6&hscode=False&p=7
// second step - weight
// https://postcalc.usps.com/Calculator/MailServices?country=0&ccode=US&oz=02343&omil=False&dz=90210&dmil=False&retail=False&mdt=4%2F8%2F2025&mdz=16%3A59&m=6&ct2=True&hscode=False&p=5&o=12
// https://postcalc.usps.com/Calculator/ShapeAndSize?country=0&ccode=US&oz=02343&omil=False&dz=90210&dmil=False&retail=False&mdt=4%2F8%2F2025&mdz=16%3A59&m=0&ct2=True&hscode=False
final function test() {
$params = new \StdClass;
$params->originZip = '02343-1905';
$params->targetZip = '07111';
$params->lithium = 0;
$params->weight = 1000;
header('Content-type: text/plain');
$this->__get_calculate($params);
die("\nDone\n");
}
}
/*
array(2) {
["Page"]=>
array(4) {
["Breadcrumb"]=>
array(2) {
[0]=>
string(56) "Package, weight 0 lb 2 oz (0.057 kg), mailed on April 9 "
[1]=>
string(43) "from HOLBROOK MA 02343 to HOLBROOK MA 02343"
}
["ICL"]=>
string(0) ""
["MailServices"]=>
array(7) {
[0]=>
array(11) {
["ImageURL"]=>
string(40) "/Images/Domestic/PriorityMailExpress.jpg"
["Title"]=>
string(29) "Priority Mail Express 1-Day®"
["PostageServiceID"]=>
int(1)
["DeliveryOptions"]=>
array(3) {
[0]=>
array(5) {
["Name"]=>
string(13) "Parcel Locker"
["URL"]=>
string(167) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=1&dok=PP"
["DeliveryDay"]=>
string(22) "Thu, Apr 10 by 6:00 PM"
["RetailPrice"]=>
string(6) "$31.40"
["CnSPrice"]=>
string(6) "$31.40"
}
[1]=>
array(5) {
["Name"]=>
string(20) "Normal Delivery Time"
["URL"]=>
string(167) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=1&dok=XP"
["DeliveryDay"]=>
string(22) "Thu, Apr 10 by 6:00 PM"
["RetailPrice"]=>
string(6) "$31.40"
["CnSPrice"]=>
string(6) "$31.40"
}
[2]=>
array(5) {
["Name"]=>
string(15) "Hold For Pickup"
["URL"]=>
string(167) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=1&dok=HP"
["DeliveryDay"]=>
string(22) "Thu, Apr 10 by 6:00 PM"
["RetailPrice"]=>
string(6) "$31.40"
["CnSPrice"]=>
string(6) "$31.40"
}
}
["Dimensions"]=>
string(0) ""
["Notes"]=>
array(0) {
}
["HasRetailPrice"]=>
bool(true)
["HasCnSPrice"]=>
bool(true)
["CommitmentLabel"]=>
string(22) "Scheduled Delivery Day"
["DropOffs"]=>
array(1) {
[0]=>
array(4) {
["ByDate"]=>
string(21) "Wed, Apr 9 by 4:00 PM"
["FacilityType"]=>
string(11) "POST OFFICE"
["Address"]=>
string(35) "333 PLYMOUTH ST, HOLBROOK, MA 02343"
["Guarantee"]=>
string(0) ""
}
}
["AdditionalDropOffLink"]=>
string(118) "<a href='/ServiceCommitments?dz=02343&oz=02343&mdt=2025/04/09 16:59' target='_blank'>Additional Drop-Off Locations</a>"
}
[1]=>
array(11) {
["ImageURL"]=>
string(33) "/Images/Domestic/PriorityMail.jpg"
["Title"]=>
string(15) "Priority Mail®"
["PostageServiceID"]=>
int(10)
["DeliveryOptions"]=>
array(3) {
[0]=>
array(5) {
["Name"]=>
string(13) "Parcel Locker"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=10&dok=PX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(5) "$9.35"
["CnSPrice"]=>
string(5) "$9.35"
}
[1]=>
array(5) {
["Name"]=>
string(20) "Normal Delivery Time"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=10&dok=XX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(5) "$9.35"
["CnSPrice"]=>
string(5) "$9.35"
}
[2]=>
array(5) {
["Name"]=>
string(15) "Hold For Pickup"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=10&dok=HX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(5) "$9.35"
["CnSPrice"]=>
string(5) "$9.35"
}
}
["Dimensions"]=>
string(0) ""
["Notes"]=>
array(0) {
}
["HasRetailPrice"]=>
bool(true)
["HasCnSPrice"]=>
bool(true)
["CommitmentLabel"]=>
string(21) "Expected Delivery Day"
["DropOffs"]=>
array(1) {
[0]=>
array(4) {
["ByDate"]=>
string(22) "Thu, Apr 10 by 4:00 PM"
["FacilityType"]=>
string(11) "POST OFFICE"
["Address"]=>
string(35) "333 PLYMOUTH ST, HOLBROOK, MA 02343"
["Guarantee"]=>
string(0) ""
}
}
["AdditionalDropOffLink"]=>
string(118) "<a href='/ServiceCommitments?dz=02343&oz=02343&mdt=2025/04/09 16:59' target='_blank'>Additional Drop-Off Locations</a>"
}
[2]=>
array(11) {
["ImageURL"]=>
string(49) "/Images/Domestic/PriorityMailLargeFlatRateBox.jpg"
["Title"]=>
string(35) "Priority Mail® Large Flat Rate Box"
["PostageServiceID"]=>
int(12)
["DeliveryOptions"]=>
array(3) {
[0]=>
array(5) {
["Name"]=>
string(13) "Parcel Locker"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=12&dok=PX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(6) "$26.30"
["CnSPrice"]=>
string(6) "$26.30"
}
[1]=>
array(5) {
["Name"]=>
string(20) "Normal Delivery Time"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=12&dok=XX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(6) "$26.30"
["CnSPrice"]=>
string(6) "$26.30"
}
[2]=>
array(5) {
["Name"]=>
string(15) "Hold For Pickup"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=12&dok=HX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(6) "$26.30"
["CnSPrice"]=>
string(6) "$26.30"
}
}
["Dimensions"]=>
string(46) "USPS-Produced Box: 12-1/4"(L) X 12"(W) X 6"(H)"
["Notes"]=>
array(0) {
}
["HasRetailPrice"]=>
bool(true)
["HasCnSPrice"]=>
bool(true)
["CommitmentLabel"]=>
string(21) "Expected Delivery Day"
["DropOffs"]=>
array(1) {
[0]=>
array(4) {
["ByDate"]=>
string(22) "Thu, Apr 10 by 4:00 PM"
["FacilityType"]=>
string(11) "POST OFFICE"
["Address"]=>
string(35) "333 PLYMOUTH ST, HOLBROOK, MA 02343"
["Guarantee"]=>
string(0) ""
}
}
["AdditionalDropOffLink"]=>
string(118) "<a href='/ServiceCommitments?dz=02343&oz=02343&mdt=2025/04/09 16:59' target='_blank'>Additional Drop-Off Locations</a>"
}
[3]=>
array(11) {
["ImageURL"]=>
string(50) "/Images/Domestic/PriorityMailMediumFlatRateBox.jpg"
["Title"]=>
string(36) "Priority Mail® Medium Flat Rate Box"
["PostageServiceID"]=>
int(13)
["DeliveryOptions"]=>
array(3) {
[0]=>
array(5) {
["Name"]=>
string(13) "Parcel Locker"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=13&dok=PX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(6) "$19.15"
["CnSPrice"]=>
string(6) "$19.15"
}
[1]=>
array(5) {
["Name"]=>
string(20) "Normal Delivery Time"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=13&dok=XX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(6) "$19.15"
["CnSPrice"]=>
string(6) "$19.15"
}
[2]=>
array(5) {
["Name"]=>
string(15) "Hold For Pickup"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=13&dok=HX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(6) "$19.15"
["CnSPrice"]=>
string(6) "$19.15"
}
}
["Dimensions"]=>
string(70) "USPS-Produced Box: 13-5/8" x 11-7/8" x 3-3/8" or 11" x 8-1/2" x 5-1/2""
["Notes"]=>
array(0) {
}
["HasRetailPrice"]=>
bool(true)
["HasCnSPrice"]=>
bool(true)
["CommitmentLabel"]=>
string(21) "Expected Delivery Day"
["DropOffs"]=>
array(1) {
[0]=>
array(4) {
["ByDate"]=>
string(22) "Thu, Apr 10 by 4:00 PM"
["FacilityType"]=>
string(11) "POST OFFICE"
["Address"]=>
string(35) "333 PLYMOUTH ST, HOLBROOK, MA 02343"
["Guarantee"]=>
string(0) ""
}
}
["AdditionalDropOffLink"]=>
string(118) "<a href='/ServiceCommitments?dz=02343&oz=02343&mdt=2025/04/09 16:59' target='_blank'>Additional Drop-Off Locations</a>"
}
[4]=>
array(11) {
["ImageURL"]=>
string(49) "/Images/Domestic/PriorityMailSmallFlatRateBox.jpg"
["Title"]=>
string(35) "Priority Mail® Small Flat Rate Box"
["PostageServiceID"]=>
int(14)
["DeliveryOptions"]=>
array(3) {
[0]=>
array(5) {
["Name"]=>
string(13) "Parcel Locker"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=14&dok=PX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(6) "$10.65"
["CnSPrice"]=>
string(6) "$10.65"
}
[1]=>
array(5) {
["Name"]=>
string(20) "Normal Delivery Time"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=14&dok=XX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(6) "$10.65"
["CnSPrice"]=>
string(6) "$10.65"
}
[2]=>
array(5) {
["Name"]=>
string(15) "Hold For Pickup"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=14&dok=HX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(6) "$10.65"
["CnSPrice"]=>
string(6) "$10.65"
}
}
["Dimensions"]=>
string(43) "USPS-Produced Box: 8-5/8" x 5-3/8" x 1-5/8""
["Notes"]=>
array(0) {
}
["HasRetailPrice"]=>
bool(true)
["HasCnSPrice"]=>
bool(true)
["CommitmentLabel"]=>
string(21) "Expected Delivery Day"
["DropOffs"]=>
array(1) {
[0]=>
array(4) {
["ByDate"]=>
string(22) "Thu, Apr 10 by 4:00 PM"
["FacilityType"]=>
string(11) "POST OFFICE"
["Address"]=>
string(35) "333 PLYMOUTH ST, HOLBROOK, MA 02343"
["Guarantee"]=>
string(0) ""
}
}
["AdditionalDropOffLink"]=>
string(118) "<a href='/ServiceCommitments?dz=02343&oz=02343&mdt=2025/04/09 16:59' target='_blank'>Additional Drop-Off Locations</a>"
}
[5]=>
array(11) {
["ImageURL"]=>
string(40) "/Images/Domestic/USPSGroundAdvantage.jpg"
["Title"]=>
string(23) "USPS Ground Advantage®"
["PostageServiceID"]=>
int(58)
["DeliveryOptions"]=>
array(1) {
[0]=>
array(5) {
["Name"]=>
string(20) "Normal Delivery Time"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=58&dok=XX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(5) "$5.25"
["CnSPrice"]=>
string(5) "$5.25"
}
}
["Dimensions"]=>
string(0) ""
["Notes"]=>
array(0) {
}
["HasRetailPrice"]=>
bool(true)
["HasCnSPrice"]=>
bool(true)
["CommitmentLabel"]=>
string(21) "Expected Delivery Day"
["DropOffs"]=>
array(0) {
}
["AdditionalDropOffLink"]=>
string(0) ""
}
[6]=>
array(11) {
["ImageURL"]=>
string(30) "/Images/Domestic/MediaMail.jpg"
["Title"]=>
string(12) "Media Mail®"
["PostageServiceID"]=>
int(76)
["DeliveryOptions"]=>
array(2) {
[0]=>
array(5) {
["Name"]=>
string(13) "Parcel Locker"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=76&dok=PX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(5) "$4.63"
["CnSPrice"]=>
string(13) "Not available"
}
[1]=>
array(5) {
["Name"]=>
string(20) "Normal Delivery Time"
["URL"]=>
string(168) "ExtraServices?country=0&ccode=US&oz=02343&omil=False&dz=02343&dmil=False&retail=False&mdt=4/9/2025&mdz=16:59&m=6&hscode=False&o=2&rect=True&l=0&h=0&w=0&g=0&mt=76&dok=XX"
["DeliveryDay"]=>
string(11) "Sat, Apr 12"
["RetailPrice"]=>
string(5) "$4.63"
["CnSPrice"]=>
string(13) "Not available"
}
}
["Dimensions"]=>
string(0) ""
["Notes"]=>
array(1) {
[0]=>
string(88) "<a href='https://pe.usps.com/text/dmm300/173.htm' target='_blank'>Restrictions Apply</a>"
}
["HasRetailPrice"]=>
bool(true)
["HasCnSPrice"]=>
bool(false)
["CommitmentLabel"]=>
string(21) "Expected Delivery Day"
["DropOffs"]=>
array(0) {
}
["AdditionalDropOffLink"]=>
string(0) ""
}
}
["Footnotes"]=>
array(2) {
[0]=>
string(103) "Priority Mail Express Items need to be mailed by a certain time for us to meet our delivery commitment."
[1]=>
string(211) "Use the <a href='/ServiceCommitments?dz=02343&oz=02343&mdt=2025/04/09 16:59' target='_blank'>Service Commitment Lookup Tool</a> for service commitments and for Priority Mail Express drop-off times and locations."
}
}
["PageError"]=>
string(0) ""
}
*/