Zen Cart Logo
Forums / Addon Shipping Modules / FedEx Web Services not working for Canadian addresses

FedEx Web Services not working for Canadian addresses

Views: 3,318

Results 1 to 13 of 13
6 Sep 2017, 2:04 PM
#1
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

FedEx Web Services not working for Canadian addresses

Anyone else seeing this problem? We're using the current 1.6.7 version of the module. Zen Cart 1.5.5e. This was working but the problem began several days ago.

Zen Log says:
PHP Warning: key() expects parameter 1 to be array, null given in /home/shipwrec/public_html/includes/modules/shipping/fedexwebservices.php on line 708

FedEx response log is:
[2017-09-06 08:49:33] stdClass::__set_state(array(
'HighestSeverity' => 'WARNING',
'Notifications' =>
array (
0 =>
stdClass::__set_state(array(
'Severity' => 'WARNING',
'Source' => 'crs',
'Code' => '556',
'Message' => 'There are no valid services available. ',
'LocalizedMessage' => 'There are no valid services available. ',
)),
1 =>
stdClass::__set_state(array(
'Severity' => 'NOTE',
'Source' => 'crs',
'Code' => '820',
'Message' => 'The destination state/province code has been changed. ',
'LocalizedMessage' => 'The destination state/province code has been changed. ',
)),
),
'TransactionDetail' =>
stdClass::__set_state(array(
'CustomerTransactionId' => ' *** Rate Request v10 using PHP ***',
)),
'Version' =>
stdClass::__set_state(array(
'ServiceId' => 'crs',
'Major' => 10,
'Intermediate' => 0,
'Minor' => 0,
)),
))

I don't know why no services are available. Client has spoken with FedEx and the account is fine.

6 Sep 2017, 3:03 PM
#2
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,957
Plugin Contributions:
8

Re: FedEx Web Services not working for Canadian addresses

what is the address they are shipping TO?

the fedex error is:

The destination state/province code has been changed.

fedEx is probably checking the valid canadian province abbreviations. the canadian zip code must also match to the province.

see:

https://en.wikipedia.org/wiki/Canadian_postal_abbreviations_for_provinces_and_territories

good luck.

6 Sep 2017, 3:14 PM
#3
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: FedEx Web Services not working for Canadian addresses

carlwhat:

what is the address they are shipping TO?

280 ROAD 13 E
Tiny, L9M0M9
ON, Canada

and I've tried others. I can't get any Canadian address to return rates. US addresses are fine.

The log shows the address is being sent:
'Recipient' =>
array (
'Address' =>
array (
'StreetLines' =>
array (
0 => '280 ROAD 13 E',
1 => '',
),
'City' => 'Tiny',
'PostalCode' => 'L9M0M9',
'CountryCode' => 'CA',
'Residential' => true,
),
'StateOrProvinceCode' => 'ON',
),

6 Sep 2017, 3:34 PM
#4
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,957
Plugin Contributions:
8

Re: FedEx Web Services not working for Canadian addresses

you need to give FedEx web services a call.

an outside shot would be to include a space in the canadian postal code. the proper code format would be:

L9M 0M9

that would be pretty lame if that worked. but i have seen worse with fedex.

fedEx's webservices api group is pretty good, but you would need to be able to provide the complete send transaction...

there also seems to be a ZC problem with the parsing of the return string as indicated by:

PHP Warning: key() expects parameter 1 to be array, null given in /home/shipwrec/public_html/includes/modules/shipping/fedexwebservices.php on line 708

an error with rating should not give a ZC log, IMHO. but i think the more important thing is getting a return rate from fedEx.

good luck.

6 Sep 2017, 3:45 PM
#5
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: FedEx Web Services not working for Canadian addresses

carlwhat:

an outside shot would be to include a space in the canadian postal code. the proper code format would be:

L9M 0M9

that would be pretty lame if that worked. but i have seen worse with fedex.

Yep, I tried that. I wish is it that simple though. I have reached out to FedEx. Thanks for trying to help.

6 Sep 2017, 8:41 PM
#6
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,957
Plugin Contributions:
8

Re: FedEx Web Services not working for Canadian addresses

jim,
did you get it figured out? now i'm curious....

thanks.

6 Sep 2017, 9:03 PM
#7
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: FedEx Web Services not working for Canadian addresses

carlwhat:

jim,
did you get it figured out? now i'm curious....

thanks.

Not yet, still working with FedEx. But I will post back once I get it solved.

7 Sep 2017, 5:32 PM
#8
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: FedEx Web Services not working for Canadian addresses

I have an open case has FedEx has escalated it. We're not getting rates for Canada and it seems only Canada. They also mentioned the Key and Password used in the FedEx shipping module belong to Numinix, the author. They have historically allowed a Key and Password from one account to work with another. They made a change on their end about a week ago related to this, I don't have details, but said it should not have caused a problem. They will or want to have Keys and Passwords tied to the accounts being used, so might be part of the problem.

I'll post back when we get to a resolution.

7 Sep 2017, 6:03 PM
#9
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,957
Plugin Contributions:
8

Re: FedEx Web Services not working for Canadian addresses

getting your own key and password is generally not that big a deal. you can then from here:

https://www.fedex.com/us/developer/web-services/process.html?tab=tab4#tab4

the tricky part is when you need to print labels, as you would then need to get label approval from fedEx.

i have a non-ZC customer that gets rates from fedex to canada all the time. it's curious that i am not hearing any complaints from them....

7 Sep 2017, 6:11 PM
#10
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: FedEx Web Services not working for Canadian addresses

carlwhat:

getting your own key and password is generally not that big a deal. you can then from here:

https://www.fedex.com/us/developer/web-services/process.html?tab=tab4#tab4

the tricky part is when you need to print labels, as you would then need to get label approval from fedEx.

i have a non-ZC customer that gets rates from fedex to canada all the time. it's curious that i am not hearing any complaints from them....

I did get the new key and password last night. They are wanting my client to go through the approval process including label printing, which makes no sense to me. I've asked if we can skip that part but waiting on a reply.

My customer is based in Canada so a Canadian address is technically domestic which might explain why all other rates work, being international. I'm supposed to hear back within 24 hours, which is late tonight.

22 Nov 2017, 5:36 PM
#11
jaywilliams avatar

jaywilliams

New Zenner

Join Date:
Aug 2009
Posts:
6
Plugin Contributions:
0

Re: FedEx Web Services not working for Canadian addresses

I have a client based in Canada as well, and experienced the exact same issue. After a number of hours debugging the API calls, I finally found the solution.

The Solution: You must disable insurance.
I achieved this by configuring the insurance field to 1,000,000.

Insurance
Insure packages when order total is greated than:
1000000

After making the change, shipping rates were restored for domestic Canadian shipments as well as United States shipments.

22 Nov 2017, 8:32 PM
#12
jeking avatar

jeking

Totally Zenned

Join Date:
Oct 2005
Location:
Chicago, IL USA
Posts:
1,592
Plugin Contributions:
0

Re: FedEx Web Services not working for Canadian addresses

jaywilliams:

I have a client based in Canada as well, and experienced the exact same issue. After a number of hours debugging the API calls, I finally found the solution.

The Solution: You must disable insurance.
I achieved this by configuring the insurance field to 1,000,000.

After making the change, shipping rates were restored for domestic Canadian shipments as well as United States shipments.

Thanks for posting this! I tried it on my clients site and now we're getting rates again.

22 Nov 2017, 10:02 PM
#13
carlwhat avatar

carlwhat

zennedOut

Join Date:
Nov 2005
Location:
los angeles
Posts:
2,957
Plugin Contributions:
8

Re: FedEx Web Services not working for Canadian addresses

carlwhat:

that would be pretty lame if that worked. but i have seen worse with fedex.

disable insurance by setting the value to 1 million. wow. i think that's pretty lame that fedex would not have included that info in the return message...

more importantly, i'm glad someone got this figured out!!

best.