Canada Post Shipping Module

Contract and non contract commercial account - Canada Post Shipping Module

Contract and non contract commercial account

by Pat43 » Thu Feb 15, 2024 8:39 pm

Hello I have installed the module and can retrieve quotes only from the counter option not the commercial and I do not know if it is related but after a few hours of attemping and looking at the code, I realised that the rest call http address for commercial account is different if you have a contract account vs a non contract account and that might explain why I keep getting empty quotes as I have a non contract account. No error messages up top. Also might be useful to track down problem, it is not possible for me to get expedited quotes but is the base perk for the non contract commercial account.

Fresh cart install.
Pat43
Posts: 1
Joined: Tue Feb 13, 2024 3:45 am
Phoenix Version:
Contact:

Re: Contract and non contract commercial account

by zipurman » Sat Feb 17, 2024 8:23 pm

I am working on re-writing all the shipping mods to use the new APIs available. I have completed UPS and FedEx. I still have USPS, Canada Post to do. Will be doing as time allows.
zipurman
-----------
User avatar
zipurman
Builder
Posts: 540
Joined: Tue Oct 13, 2020 5:20 pm
Phoenix Version: v
Contact:

Re: Contract and non contract commercial account

by zipurman » Tue Feb 20, 2024 11:12 pm

Okay, after reviewing the code and the API docs, here is what I found:

1. The only time a different endpoint or logic is required for commercial is when Creating Packages, which is not part of the RATE requests API.
2. The module as-is, has a field for CONTRACT ID. If blank, no contract is passed to the API as the docs suggest for RATE requests.
3. I have a Canada Post non-contract account and it works fine for me.

If you enable the error reporting in the module, you should see errors on the screen/email. If not, check your error_log for errors.
I would be willing to look at your setup if you want to email me links and creds to plord@inetx.ca
zipurman
-----------
User avatar
zipurman
Builder
Posts: 540
Joined: Tue Oct 13, 2020 5:20 pm
Phoenix Version: v
Contact: