It appears the USPS does not accept the ISO code for Isle of Man and uses GB instead (per: http://pe.usps.com/text/imm/fh_014.htm). This seems to be slightly different than the issues in #326836: Update the UK country file to include all zones and #609444: USPS quote for international orders: undefined: Missing value for Country..

Here is a partial response from USPS.

<IntlRateV2Response><Package ID="0"><Error><Number>-2147218046</Number><Source>IntlPostage;clsIntlPostage.GetCountryAndRestirctedServiceId;clsIntlPostage.CalcAllPostageDimensionsXML;IntlRateV2.ProcessRequest</Source><Description>Invalid Country Name</Description><HelpFile></HelpFile><HelpContext>1000440</HelpContext></Error></Package></IntlRateV2Response>

This is part of the data sent to USPS.

    <ShipTo>
      <Address>
        <StateProvinceCode></StateProvinceCode>
        <PostalCode>IM3 1AE</PostalCode>
        <CountryCode>IM</CountryCode>
      </Address>
    </ShipTo>

Comments

tr’s picture

Status: Active » Fixed

USPS doesn't use ISO codes. It uses the ISO 3166 English short name, IN MOST CASES. We have a function in uc_usps.countries.inc to map the exceptions. In this case, the English short name is 'Isle of Man' but USPS wants to see 'Isle of Man (Great Britain and Northern Ireland)'. We already had this in our mapping file, but it was mapped to 'Isle of Man (Great Britain)', which USPS didn't recognize.

Committed the fix to 6.x-2.x.
7.x-3.x doesn't have this problem.

(BTW, the "data sent to USPS" that you pasted above is actually UPS data, not USPS.)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.