Jump to content
Sign in to follow this  

Fixed fedex_direct_2.07 "Invalid recipient country" in shipping quote

Recommended Posts

Re: fedex_direct_2.07 "Invalid recipient country" error


With debug on I get the "Invalid recipient country" error for live shipping quotes to international destinations. I ship from the US.


I read on these forums that it is caused by FedEx account authorization issues. I called FedEx and Rob told me that's not it". I emailed him the debug strings and he pointed out that the (3025,"FDXE") tag is required for international rate quotes. I made the recommended patch to fedex1.php and it now works.


It's not quite that easy. When you include the FDXE tag, Ground rates are not quoted. Since Ground is only possible for US and CAnadian destinations, I put it as an else clause for the existing US, CA, PR test.


Here is my change to <site root>/includes/modules/shipping/fedex1.php.


Near line 591 is the if statement:


if ($order->delivery['country']['iso_code_2'] == "US" || $order->delivery['country']['iso_code_2'] == "CA" ||$order->delivery['country']['iso_code_2'] == "PR") {

$state .= tep_get_zone_code($order->delivery['country']['id'], $order->delivery['zone_id'], ''); // Recipient state

if ($state == "QC") $state = "PQ";

$data .= '16,"' . $state . '"'; // Recipient state



I added an else clause to support international quotes.

else{ // international quote

$data .= '3025,"FDXE"'; // quote express service for international destinations




This is my first contribution to the OSCommerce effort. I've been working on my 1st OSC site for 10 days. Sorry it took so long. As a newbie, I welcome pointers on how to properly offer contributions.


I hope this works for you. If not please tell me, Mitch

Edited by msburko

Share this post

Link to post
Share on other sites
noted - thanks for the input! - will test and include in future update.

The FedEx modules full support thread is here: http://forums.oscommerce.com/index.php?showtopic=238898


I was having a similar problem and just temp-tested this edit on production server setup (not yet migrated to live store, of course) and it worked with no noticeable side effects as of yet. Just thought I might chime in :)

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this