Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

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


msburko

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
Link to comment
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://www.oscommerce.com/forums/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 :)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...