Jump to content

Shipping error with Fedex


Recommended Posts

No, the gateways know where to send the request. It's embedded in the code.
 
From what I see in the code, the URL may be:

http*//fedex.com/ws/rate/v13/
http*//fedex.com/ws/rate/v13/getRates (probably not)
https*//ws.fedex.com:443/web-services/ship (probably not)
Link to post
Share on other sites

  • Replies 68
  • Created
  • Last Reply

Top Posters In This Topic

Well, for those who want to try this, let's add a statement that will dump the actual request to the error log.

 

In /modules/shipping/Fedex/shipping.class.php, near line 168, there is:

$response = $this->_client->getRates($request);

On a new line after that, add:

trigger_error( "FEDEX REQUEST:" . $this->_client->__getLastRequest() );

 

If these errors are showing up in CubeCart's admin Error Log, System Error Log, we can check if what needs sent is getting sent.

Link to post
Share on other sites

To answer your question Brian the getRates function will return an object that can be used to check values. We've had a few support tickets about this but so far its come down to module configuration. If a sales ticket can be opened with FTP and admin access I can debug this thoroughly. It's hard to help without getting my hands dirty. 

 

In the shipping.class.php file of the module after:

$response = $this->_client->getRates($request);

Add:

var_dump($response);

This will output the return data on screen during checkout.

 

I have a test account which seems to also fail on authentication. I don't know if the integration has changed as it certainly used to work...

 

Developer Test Key:

 M9ufQOdtCn9ll71X

Test Account Number:

 510087062

Test Password:

FooU8Gewy6IRFknQna0fhdMW6

Test Meter Number:

 118588781

Link to post
Share on other sites

I'll put this here temporarily and then delete it, as it's HUGE!

(screen dump removed) 

This Debug Warning also:

 

[Warning] /home3/butter01/public_html/plushcatalog/includes/functions.inc.php:597 - Cannot modify header information - headers already sent by (output started at /home3/butter01/public_html/plushcatalog/modules/shipping/FedEx/shipping.class.php:169)

 

And the Checkout page did NOT show at all.

 

Took the dump code off and refreshed the page, and all looked OK. Warning about header went away, too. I carried the order as far as adding a Delivery Address, and the Fedex choices disappeared, with this error message:

 

[Notice] /home3/butter01/public_html/plushcatalog/modules/shipping/FedEx/shipping.class.php:197 - FedEx Error: The length of the destination state or province exceeds the limit of 2 characters.

States ARE shown as numbers in the _addressbook table for both billing and delivery for this newly created test account. This is a LIVE production Fedex account.

I'll be gone for a while today, so I've disabled Fedex shipping for now on our plushcatalog site. Hopefully that helped.

Link to post
Share on other sites

"I have a test account which seems to also fail on authentication."

 

Having Googled for similar problems, I noticed a number of events dealt with the fact that test credentials are required to use a different URL to make test rate requests.

 

Other URLs I've seen are:

https*//gateway.fedex.com:443/web-services (production)

https*//gatewaybeta.fedex.com:443/web-services (testing)

 

According to what was reported, when you sign up for a Fedex account, you will get an email that includes the URL to use -- presumably with instructions on what to change in the code.

 

First is to test, then login to your Fedex account to "self-certify" yourself that you can accurately make rate requests and to be switched to production, and another email is sent with production credentials and URL.

 

Another report: "FedEx periodically purges the test servers. Requesting updated credentials will resolve your issue."

Link to post
Share on other sites

The two-letter state does matter.

 

The "estimated value" (what you get when there is no customer destination address*) is based on the state for the store's location, which very likely does contain a number in the config data -- which allows the getStateFormat() function to return the desired data.

 

Due to a bug in the code (in CC522 - maybe still in CC524), some addresses may have the state's name recorded in the addressbook instead of the state_id. This prevents the proper retrieval of the state_iso via getStateFormat().

 

Christopher, your CC_addressbook table might have a name for the 'state' field for the account you are testing with.

 

Can you verify that?

 

* CubeCart uses the store's location as the destination address when making the initial rate quotes. That means the estimated prices listed are for a shipment from you - to you.

Link to post
Share on other sites

The two-letter state does matter.

 

The "estimated value" (what you get when there is no customer destination address*) is based on the state for the store's location, which very likely does contain a number in the config data -- which allows the getStateFormat() function to return the desired data.

 

Due to a bug in the code, some addresses may get the state's name recorded in the addressbook instead of the state_id. This prevents the proper retrieval of the state_iso via getStateFormat().

 

Christopher, your CC_addressbook table might have a name for the 'state' field for the account you are testing with.

 

Can you verify that?

 

* CubeCart uses the store's location as the destination address when making the initial rate quotes. That means the estimated prices listed are for a shipment from you - to you.

It does, has state spelled out fully. I don't see a way to fix it as it is a dropdown tab with selections built in,

Link to post
Share on other sites

I have developed a code-snippet that should allow an admin to fix the addressbook. If your addressbook has hundreds of records with names (as opposed to numbers) in the state field, then this snippet would be of benefit.

 

But if you have just a dozen or so records with names, take note of the state names. Then, in the CC_geo_zone table, note the 'id' of those states.

 

Back in the CC_addressbook table, replace the names with the respective 'id'.

 

Test.

Link to post
Share on other sites

I have developed a code-snippet that should allow an admin to fix the addressbook. If your addressbook has hundreds of records with names (as opposed to numbers) in the state field, then this snippet would be of benefit.

 

But if you have just a dozen or so records with names, take note of the state names. Then, in the CC_geo_zone table, note the 'id' of those states.

 

Back in the CC_addressbook table, replace the names with the respective 'id'.

 

Test.

I have 78 customers.

Link to post
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
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...