Jump to content

Shipping error with Fedex


Recommended Posts

I get the following when I try to checkout:

The following errors were detected:

  • Unfortunately there are no suitable shipping methods available for your order. This may be because the total weight of your order is too high or we cannot ship to your country. Please contact a member of our staff for any further inquiries.

The request log shows:

 

Request Sent - http://www.cubecart.com/stats/ null
Response received {"gateway":......
 
Edit as requested.

 

 

Any ideas?

 

Thanks

Chris

Link to post
Share on other sites

  • Replies 68
  • Created
  • Last Reply

Top Posters In This Topic

Hi Chris, the request log in your post is not actually relevant to the issue. The FedEx module is the only one which doesn't use CubeCarts request class which logs server communications. We need to take a look at your module configuration and maybe do some testing. If possible please can you raise a tech support ticket with FTP and admin access to your store and we'll find out what's going on.

Link to post
Share on other sites

Hi Chris, the request log in your post is not actually relevant to the issue. The FedEx module is the only one which doesn't use CubeCarts request class which logs server communications. We need to take a look at your module configuration and maybe do some testing. If possible please can you raise a tech support ticket with FTP and admin access to your store and we'll find out what's going on.

I did. He replied:

Hi,

I can read from the site php error log:

FedEx Error: Authentication Failed

Please check Fedex shipping module settings, error speaks for it self.

Kind Regards,

----------------------------------

Milos Homola

CubeCart Staff

 

 

Not entirely helpful.

Link to post
Share on other sites

Welcome Christopher Short! Glad to see you made it to the forums.

 

Let us know the exact version of CubeCart you are running. We can presume you have an account with access codes for Fedex?

5.2.4(most current as I installed 2 days ago). I have a fedex account, and got the meter number and passcodes needed from them for it.

Link to post
Share on other sites

Hey Chris, my colleague Milos is correct. That message comes directly from FedEx not CubeCart. The values set in the module for authentication will be incorrect. As I'm sure you can understand this isn't information we could know.

Link to post
Share on other sites

Please bear with me as I do not have a copy of the Fedex documentation.

 

Can you confirm that the test key, password, meter-number and account number you were issued is for initial testing purposes only of Fedex's web services (requires a different web address to use), or has it been converted to a production-ready account?

 

And is the account configured for domestic-only, or domestic/international?

Link to post
Share on other sites

Please bear with me as I do not have a copy of the Fedex documentation.

 

Can you confirm that the test key, password, meter-number and account number you were issued is for initial testing purposes only (requires a different web address to use), or has it been converted to a production-ready account?

 

And is the account configured for domestic-only, or domestic/international?

It is production ready. Account is for both, although I only ship domestic ground.

Hey Chris, my colleague Milos is correct. That message comes directly from FedEx not CubeCart. The values set in the module for authentication will be incorrect. As I'm sure you can understand this isn't information we could know.

If it is from fedex, why do I not see it too?

Link to post
Share on other sites

"If it is from Fedex, why do I not see it too?"

 

The gateway code examines the response from Fedex. If the response has either FAILURE or ERROR in the stream, then the code executes this:

trigger_error('FedEx Error: '.$response->Notifications->Message);

 

trigger_error() has PHP log the function's argument to the PHP error log (if one is set up). In some cases, CubeCart will also log the function's argument to the admin Error Log, System Error Log.

 

Other than that, there is no code to interpret or display things that go wrong in a descriptive way. The customer's experience is CubeCart's banner saying no suitable shipping is available.

Link to post
Share on other sites

"If it is from Fedex, why do I not see it too?"

 

The gateway code examines the response from Fedex. If the response has either FAILURE or ERROR in the stream, then the code executes this:

trigger_error('FedEx Error: '.$response->Notifications->Message);

 

trigger_error() has PHP log the function's argument to the PHP error log (if one is set up). In some cases, CubeCart will also log the function's argument to the admin Error Log, System Error Log.

 

Other than that, there is no code to interpret or display things that go wrong in a descriptive way. The customer's experience is CubeCart's banner saying no suitable shipping is available.

So how do I fix it then?

Link to post
Share on other sites

I have a concern that the gateway code is not assembling a request array with the correct 'xpath'.

 

I've compared the request array paths to the wsdl paths and this is what I see for CC522:

$request['WebAuthenticationDetail']['UserCredential']['Key'] = $this->_settings['key']
$request['WebAuthenticationDetail']['UserCredential']['Password'] = $this->_settings['password']
$request['ClientDetail']['AccountNumber'] = $this->_settings['accNo']
$request['ClientDetail']['MeterNumber'] = $this->_settings['meterNo']

[Descendent to Ancestor]
Key>sequence>WebAuthenticationCredential>schema>types>definitions
Password>sequence>WebAuthenticationCredential>schema>types>definitions
AccountNumber>sequence>ClientDetail>schema>types>definitions
MeterNumber>sequence>ClientDetail>schema>types>definitions

The MeterNumber and AccountNumber belong to ClientDetail.

 

However, the Key and Password do not belong to UserCredential, but rather belong to WebAuthenticationCredential.

 

So, either the gateway code is wrong, the wsdl is wrong, or I really don't know much about wsdl structure..

 

Try this. In the file modulesshippingFedExshipping.class.php, line 115-116, change:

$request['WebAuthenticationDetail'] = array('UserCredential' =>
           array('Key' => $this->_settings['key'], 'Password' => $this->_settings['password']));

to:

 
// $request['WebAuthenticationDetail'] = array('UserCredential' =>
//            array('Key' => $this->_settings['key'], 'Password' => $this->_settings['password']));
$request['WebAuthenticationCredential'] = array('Key' => $this->_settings['key'], 'Password' => $this->_settings['password']);

Again, since I do not have a Fedex account, nor the documentation, this is just an educated guess.

Link to post
Share on other sites

I thought I might be able to help if I opened a Fedex account. I've done that, but I can't find the section to get the info to fill in the CC form, other than the account number and password. So if you can steer me to the right url on the Fedex site, I'll see what I can do to help.

Link to post
Share on other sites

I have a concern that the gateway code is not assembling a request array with the correct 'xpath'.

 

I've compared the request array paths to the wsdl paths and this is what I see for CC522:

$request['WebAuthenticationDetail']['UserCredential']['Key'] = $this->_settings['key']
$request['WebAuthenticationDetail']['UserCredential']['Password'] = $this->_settings['password']
$request['ClientDetail']['AccountNumber'] = $this->_settings['accNo']
$request['ClientDetail']['MeterNumber'] = $this->_settings['meterNo']

[Descendent to Ancestor]
Key>sequence>WebAuthenticationCredential>schema>types>definitions
Password>sequence>WebAuthenticationCredential>schema>types>definitions
AccountNumber>sequence>ClientDetail>schema>types>definitions
MeterNumber>sequence>ClientDetail>schema>types>definitions

The MeterNumber and AccountNumber belong to ClientDetail.

 

However, the Key and Password do not belong to UserCredential, but rather belong to WebAuthenticationCredential.

 

So, either the gateway code is wrong, the wsdl is wrong, or I am completely way off base.

 

Try this. In the file modulesshippingFedExshipping.class.php, line 115-116, change:

$request['WebAuthenticationDetail'] = array('UserCredential' =>
           array('Key' => $this->_settings['key'], 'Password' => $this->_settings['password']));

to:

 
// $request['WebAuthenticationDetail'] = array('UserCredential' =>
//            array('Key' => $this->_settings['key'], 'Password' => $this->_settings['password']));
$request['WebAuthenticationCredential'] = array('Key' => $this->_settings['key'], 'Password' => $this->_settings['password']);

Again, since I do not have a Fedex account, nor the documentation, this is just an educated guess.

Same error.

I thought I might be able to help if I opened a Fedex account. I've done that, but I can't find the section to get the info to fill in the CC form, other than the account number and password. So if you can steer me to the right url on the Fedex site, I'll see what I can do to help.

You have to call them. They walk you through getting a production account and give you info needed to get the codes.

Link to post
Share on other sites

Ok, question for the developers: Since the response from a SOAP server is presumably in XML, and the expressions to find the value of nodes are written in object-operator notation, should we consider using type casting as we do in SimpleXML? Or does PHP's SoapClient truly return an object? Or does the wsdl element type fix all that?

Link to post
Share on other sites

Done. I have it all setup now. I thought there was a built-in way to set the order of shipping providers the way I wanted it, so I had to disable FedEx until USPS shows first.

 

I DID have an issue originally setting it up, because I used USA out of habit, instead of US, in the Parcel Origin Information.

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...