bsmither Posted October 25, 2013 Share Posted October 25, 2013 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) Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 25, 2013 Share Posted October 25, 2013 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. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 25, 2013 Share Posted October 25, 2013 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 Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted October 25, 2013 Share Posted October 25, 2013 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. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 25, 2013 Share Posted October 25, 2013 Well yours is working. Just remove the line var_dump($response); .. and you should see shipping options in your basket. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 25, 2013 Share Posted October 25, 2013 "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." Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted October 25, 2013 Author Share Posted October 25, 2013 I found my error-my password was different for it. However, fedex shows the requests coming through with the states spelled out and they require it to be a 2 digits code(Florida=Fl ect). How do I fix that? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 25, 2013 Share Posted October 25, 2013 Hi Chris, you shouldn't nee to worry about that. Are you getting an error or behaviour you don't expect? Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted October 25, 2013 Author Share Posted October 25, 2013 Hi Chris, you shouldn't nee to worry about that. Are you getting an error or behaviour you don't expect? This is the error code. [25-Oct-2013 15:08:55] PHP Notice: FedEx Error: The length of the destination state or province exceeds the limit of 2 characters. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted October 25, 2013 Share Posted October 25, 2013 I saw that same error message about states not being sent as 2 characters. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 25, 2013 Share Posted October 25, 2013 Thats just a notice so might be something we can ignore. Most importantly are you getting FedEx shipping results in the drop down menu? Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted October 25, 2013 Author Share Posted October 25, 2013 Thats just a notice so might be something we can ignore. Most importantly are you getting FedEx shipping results in the drop down menu? Nope. Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 25, 2013 Share Posted October 25, 2013 Ok can we get FTP access via our helpdesk? Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted October 25, 2013 Author Share Posted October 25, 2013 Ok can we get FTP access via our helpdesk? Already have one in. Can it be shared with you? Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 25, 2013 Share Posted October 25, 2013 Can you tell me the ticket id? Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted October 25, 2013 Author Share Posted October 25, 2013 Can you tell me the ticket id? 96192 Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 25, 2013 Share Posted October 25, 2013 Looks like its working to me? See attachment. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted October 25, 2013 Author Share Posted October 25, 2013 Looks like its working to me? See attachment. Go buy a rocket motor Quote Link to comment Share on other sites More sharing options...
Al Brookbanks Posted October 25, 2013 Share Posted October 25, 2013 Hmm that worked too. Does the item in question have a weight assigned? I tried 'D12X173' which worked. What is the item code of the one which doesn't work? Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted October 25, 2013 Author Share Posted October 25, 2013 It appears to be an issue when you log into an account. Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 25, 2013 Share Posted October 25, 2013 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. Quote Link to comment Share on other sites More sharing options...
Dirty Butter Posted October 25, 2013 Share Posted October 25, 2013 Mine works UNTIL I log in. Then only the USPS choices show. Debug still showing that same Fedex number of characters notice. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted October 25, 2013 Author Share Posted October 25, 2013 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, Quote Link to comment Share on other sites More sharing options...
bsmither Posted October 25, 2013 Share Posted October 25, 2013 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. Quote Link to comment Share on other sites More sharing options...
Christopher Short Posted October 25, 2013 Author Share Posted October 25, 2013 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.