Jump to content

Archived

This topic is now archived and is closed to further replies.

Christopher Short

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

Share this post


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.

Share this post


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.

Share this post


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?

Share this post


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.

Share this post


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.

Share this post


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?

Share this post


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?

Share this post


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.

Share this post


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?

Share this post


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.

Share this post


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.

Share this post


Link to post
Share on other sites

Not really necessary, but since we now know the Request Log you copied in your first post is not relevant to the issue, kindly please consider editing the post to remove it.

Share this post


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.

Share this post


Link to post
Share on other sites

 

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

 

I'll see what I can do.

Share this post


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?

Share this post


Link to post
Share on other sites

I think I see how the original statements 115-116 would work. But then, would that make the suggested change really not work?

Share this post


Link to post
Share on other sites

I've downloaded the Developer info, Bsmither. I had several choices, but I chose PHP. I can get it in Java, C#, and VB.net. You can get the PHP version from me.

Share this post


Link to post
Share on other sites

Thanks. Any PDFs?

 

The gateway code is not significantly different than the sample code.

 

So, I wonder of someone at Fedex can observe a request's results and make sure the data sent in the request is valid?

Share this post


Link to post
Share on other sites

Got it. You may want to delete the links as the Developer Guide says it is "Confidential".

Share this post


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.

Share this post


Link to post
Share on other sites

Did you get an email stating what URL to use for your account (if it is still authorized for testing)?

Share this post


Link to post
Share on other sites

Yes I did, but the url appears to have the customer number not included in the url, like it's broken. And there's no place for that URL in the CC module. What's it for?

Share this post


Link to post
Share on other sites

×
×
  • Create New...