Canada USPS Shipping

Posted By SAbow Wed 24 Jan 2018
Add to Favorites0
Author Message
SAbow
 Posted Wed 24 Jan 2018
Supreme Being

Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)

Group: Forum Members
Last Active: Tue 2 Feb 2021
Posts: 77, Visits: 334
I have several Kartris websites. At least two of them do not show USPS shipping estimates for addresses in Canada.I tried many other countries - they are all getting the shipping estimates fine.

Can you think of anything that I may be doing wrong? Otherwise it looks like it may be a bug in kartris...?
 Capture.jpeg (3 views, 6.44 KB)
SAbow
 Posted Tue 30 Jan 2018
Supreme Being

Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)

Group: Forum Members
Last Active: Tue 2 Feb 2021
Posts: 77, Visits: 334
I printed the xml to the error logs and found that it was receiving this error from USPS:

TheOrigin ZIP Code and the Destination Postal Code is required for Priority MailInternational when mailing to Canada.


After searching online, I found this documentation from USPS

https://www.usps.com/business/web-tools-apis/2015-may-webtools-release-notes.rtf

which says that

UnitedState origin ZIP Code will be required to obtain Priority Mail Internationalnon-Flat Rate pricing and availability for Canada destinations

SAbow Marked As Answer
 Posted Tue 30 Jan 2018
Supreme Being

Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)

Group: Forum Members
Last Active: Tue 2 Feb 2021
Posts: 77, Visits: 334
I changed the code in USPS.vb (in the dll)

from:


If LCase(objShippingDetails.RecipientsAddress.CountryIsoCode) <> "us" Then


url = "?API=IntlRateV2&XML=<IntlRateV2Request USERID=""{0}""><Package ID=""0""><Pounds>{1}</Pounds><Ounces>{2}</Ounces><Machinable>{3}</Machinable><MailType>{4}</MailType><ValueOfContents>{5}</ValueOfContents><Country>{7}</Country><Container>{6}</Container><Size>{8}</Size><Width>{9}</Width><Length>{10}</Length><Height>{11}</Height><Girth>{12}</Girth></Package></IntlRateV2Request>"


Else
url = "?API=RateV4&XML=<RateV4Request USERID=""{0}""><Revision/><Package ID=""0""><Service>{1}</Service><ZipOrigination>{2}</ZipOrigination><ZipDestination>{3}</ZipDestination><Pounds>{4}</Pounds><Ounces>{5}</Ounces><Container>{6}</Container><Size>{8}</Size><Width>{9}</Width><Length>{10}</Length><Height>{11}</Height><Girth>{12}</Girth><Machinable>{7}</Machinable><ReturnLocations></ReturnLocations><ReturnServiceInfo></ReturnServiceInfo><ShipDate>{13}</ShipDate></Package></RateV4Request>"
End If



to




If LCase(objShippingDetails.RecipientsAddress.CountryIsoCode) <> "us" Then

If LCase(objShippingDetails.RecipientsAddress.CountryIsoCode) = "ca" Then
url = "?API=IntlRateV2&XML=<IntlRateV2Request USERID=""{0}""><Revision>2</Revision><Package ID=""0""><Pounds>{1}</Pounds><Ounces>{2}</Ounces><Machinable>{3}</Machinable><MailType>{4}</MailType><ValueOfContents>{5}</ValueOfContents><Country>{7}</Country><Container>{6}</Container><Size>{8}</Size><Width>{9}</Width><Length>{10}</Length><Height>{11}</Height><Girth>{12}</Girth><OriginZip>11219</OriginZip></Package></IntlRateV2Request>"
Else
url = "?API=IntlRateV2&XML=<IntlRateV2Request USERID=""{0}""><Package ID=""0""><Pounds>{1}</Pounds><Ounces>{2}</Ounces><Machinable>{3}</Machinable><MailType>{4}</MailType><ValueOfContents>{5}</ValueOfContents><Country>{7}</Country><Container>{6}</Container><Size>{8}</Size><Width>{9}</Width><Length>{10}</Length><Height>{11}</Height><Girth>{12}</Girth></Package></IntlRateV2Request>"
End If

Else
url = "?API=RateV4&XML=<RateV4Request USERID=""{0}""><Revision/><Package ID=""0""><Service>{1}</Service><ZipOrigination>{2}</ZipOrigination><ZipDestination>{3}</ZipDestination><Pounds>{4}</Pounds><Ounces>{5}</Ounces><Container>{6}</Container><Size>{8}</Size><Width>{9}</Width><Length>{10}</Length><Height>{11}</Height><Girth>{12}</Girth><Machinable>{7}</Machinable><ReturnLocations></ReturnLocations><ReturnServiceInfo></ReturnServiceInfo><ShipDate>{13}</ShipDate></Package></RateV4Request>"
End If
Tue 30 Jan 2018 by SAbow
Tiggywiggler
 Posted Wed 28 Feb 2018
Supreme Being

Supreme Being - (120,318 reputation)Supreme Being - (120,318 reputation)Supreme Being - (120,318 reputation)Supreme Being - (120,318 reputation)Supreme Being - (120,318 reputation)Supreme Being - (120,318 reputation)Supreme Being - (120,318 reputation)Supreme Being - (120,318 reputation)Supreme Being - (120,318 reputation)

Group: Forum Members
Last Active: Mon 6 Dec 2021
Posts: 235, Visits: 750
Hello sir,

Did this solve the problem you were experiencing? Are you still seeing issues?


We are always willing to help out the community or pitch in to help you fix a problem. However, if you want a complete solution made such as a code module or new feature added you have two options. Either
1) Reach out to the Kartris internal development team at http://www.kartris.com/Contact.aspx.
2) Contact one of the Kartris approved partners at http://www.kartris.com/t-Worldwide-Developers.aspx.

Have fun and good luck coding.
SAbow
 Posted Wed 28 Feb 2018
Supreme Being

Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)Supreme Being - (45,049 reputation)

Group: Forum Members
Last Active: Tue 2 Feb 2021
Posts: 77, Visits: 334
I resolved the issue by adding the code that i posted above. I was able to add it because you gave me the uncompiled code for the USPS dll - but I would suggest that you modify the dll since most people just use your compiled dll
Paul
 Posted Fri 2 Mar 2018
große Käse

große Käse - (508,132 reputation)große Käse - (508,132 reputation)große Käse - (508,132 reputation)große Käse - (508,132 reputation)große Käse - (508,132 reputation)große Käse - (508,132 reputation)große Käse - (508,132 reputation)große Käse - (508,132 reputation)große Käse - (508,132 reputation)

Group: Administrators
Last Active: Tue 10 Sep 2024
Posts: 807, Visits: 2,748
Will update this for the next release, thanks.

--
If my post solves your issue, can you 'Mark as Answer' so it's easier for other users to find in future.

If you would like to be informed of new features, new releases, developments and occasional special bonuses, please sign up to our mailing list: http://bit.ly/19sKMZb

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top