Skip to content

Commit

Permalink
Update usps.php
Browse files Browse the repository at this point in the history
As outlined in section 2.3.1 of this USPS technical document (https://www.usps.com/business/web-tools-apis/2015-may-webtools-release-notes.rtf), the <OriginZip> value is required to obtain Priority Mail International non-Flat Rate pricing and availability for Canada destinations.
  • Loading branch information
billynoah committed Aug 6, 2015
1 parent 0473564 commit 919a074
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion upload/catalog/model/shipping/usps.php
Expand Up @@ -280,6 +280,7 @@ public function getQuote($address) {

if (isset($country[$address['iso_code_2']])) {
$xml = '<IntlRateV2Request USERID="' . $this->config->get('usps_user_id') . '">';
$xml .= ' <Revision>2</Revision>';
$xml .= ' <Package ID="1">';
$xml .= ' <Pounds>' . $pounds . '</Pounds>';
$xml .= ' <Ounces>' . $ounces . '</Ounces>';
Expand All @@ -302,6 +303,7 @@ public function getQuote($address) {
$xml .= ' <Length>' . $this->config->get('usps_length') . '</Length>';
$xml .= ' <Height>' . $this->config->get('usps_height') . '</Height>';
$xml .= ' <Girth>' . $this->config->get('usps_girth') . '</Girth>';
$xml .= ' <OriginZip>' . substr($this->config->get('usps_postcode'), 0, 5) . '</OriginZip>';
$xml .= ' <CommercialFlag>N</CommercialFlag>';
$xml .= ' </Package>';
$xml .= '</IntlRateV2Request>';
Expand Down Expand Up @@ -471,4 +473,4 @@ public function getQuote($address) {

return $method_data;
}
}
}

0 comments on commit 919a074

Please sign in to comment.