Jump to content

Fedex Carrier Module - Error 868 : Service Not Allowed (How to fix)


Recommended Posts

I was just looking for solution to this problem and bumped into this thread:

http://www.prestashop.com/forums/topic/173948-fedex-carrier-module-error-868-service-not-allowed/

 

All I have to say is...Mike Kranzler, are you out of your mind????!!!

First, the guy clearly explains the issue and pointed to the direct problem.

You eventually *lock* the thread with this comment: "Since this is not an issue with PrestaShop, but a request to circumvent another company's own rules, I am locking this thread"

 

The official module has this problem, and nobody can use it except for people in the USA because of the way it was written, it has a built in bug that doesn't allow it to be activated!

I can't believe it has not been identified and fixed until now, but with moderators like this, no wonder...

 

Here is the solution/workaround:

in /modules/fedexcarrier/fedexcarrier.php

Find

$request['RequestedShipment']['Recipient']['Address'] = array('StreetLines' => Configuration::get('FEDEX_CARRIER_ADDRESS1'), 'City' => Configuration::get('FEDEX_CARRIER_CITY'), 'StateOrProvinceCode' => $shipper_state['iso_code'], 'PostalCode' => Configuration::get('FEDEX_CARRIER_POSTAL_CODE'), 'CountryCode' => $shipper_country['iso_code']);

Replace with:

// $request['RequestedShipment']['Recipient']['Address'] = array('StreetLines' => Configuration::get('FEDEX_CARRIER_ADDRESS1'), 'City' => Configuration::get('FEDEX_CARRIER_CITY'), 'StateOrProvinceCode' => $shipper_state['iso_code'], 'PostalCode' => Configuration::get('FEDEX_CARRIER_POSTAL_CODE'), 'CountryCode' => $shipper_country['iso_code']);
   
$request['RequestedShipment']['Recipient']['Address'] = array('StreetLines' => 'Av. Mouzinho de Abuquerque C.C. Premar Lj. 95', 'City' => 'Povoa de Varzim', 'StateOrProvinceCode' => '', 'PostalCode' => '4490409', 'CountryCode' => 'PT');

This disabled the first $request line and replaces it with a line that does not use the same (shipper's) address, so you will no longer get any error when trying to activate the module.
You can basically change the address in the array to any valid address that you wish, but this one will work, as long as you don't reside/ship-from PT (Portugal).

Edited by doclucas (see edit history)
  • Like 1
Link to comment
Share on other sites

By the way, very important note, you must properly setup and enable the same currency in your shop's backoffice (Admin -> Localization -> Currencies) of your country, to be able to use this module outside the USA.

That's because FedEX sends the XML response with a price using your own currency, something like this:

...
<Currency>SGD</Currency>
<Amount>65.02</Amount>
...

In this case, the quote is in Singapore dollars, and you must have SGD currency properly configured in your back office, or else the front office will not show the FedEx module at all.

If the currency is properly configured, you will get real time quotes, anywhere in the world. :)

Hope I explained this well enough.

Edited by doclucas (see edit history)
Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

Is this a fix you tried on the Fedex native module ?

http://addons.prestashop.com/en/natif/4164-fedexcarrier.html

 

Because I keep getting the error "Error 691 : The PurposeOfShipmentType is null, empty or invalid." (I can't find this error code in the fedex developer guide). I thought it was because Fedex native module is only an old fedex API (RateService_v10.wsdl instead of RateService_v13.wsdl) but if you made it work, then it might come from something else.

Link to comment
Share on other sites

  • 3 weeks later...

Hi,

 

Is this a fix you tried on the Fedex native module ?

http://addons.prestashop.com/en/natif/4164-fedexcarrier.html

 

 

Yes, Fabien, this is a fix to  the built in module in v1.6

By the way, the v10 wsdl and v13 are not much different and it's perfectly fine to use v10.

 

p.s. sorry for the late response, I am subscribed to the thread, but for some reason didn't get any email notification...(?)

Edited by doclucas (see edit history)
Link to comment
Share on other sites

Hi,

 

Thanks for your answer !

I am facing another issue : "Error 691 : The PurposeOfShipmentType is null, empty or invalid"

I was thinking it might come from an outdated WSDL (since there is no such error described in fedex technical documentation), but if you manage to make it work it must be something else. I'll check the module code.

 

Best regards,

Fabien

Link to comment
Share on other sites

Fabien, you will have to debug the module. The problem is not in the wsdl, the problem is in the XML request that the module is sending.

Frankly, I am not using presta or this fedex module, so I can't debug this myself, but since I developed the osCommerce FedEx module I was just curios to see how it works on Presta, and I can assure you that if the module is sending PurposeOfShipmentType, then it's not really necessary in the XML request, so you should read the documentation and see what the XML request really require in your own ship scenarios and change the code accordingly. It will probably require proper debugging and re-development of the code, but if you are familiar with PHP and XML, it should be quite simple, as long as you do read the documentation.

Maybe then you can share your fixed/updated module with the community  :)

Link to comment
Share on other sites

but if you are familiar with PHP and XML, it should be quite simple, as long as you do read the documentation.

 

In fact, I was the developer who develop this module for PrestaShop in the first place two years ago ^^'

But at this time, there was no issue with the "PurposeOfShipmentType". The module was updated many times by others since I stopped working on it, so I have to check first what modifications were done.

 

I developed the osCommerce FedEx module I was just curios to see how it works on Presta, and I can assure you that if the module is sending PurposeOfShipmentType

Thanks, your expertise is much appreciated :)

When I said it might be the WSDL which is too old, it was just an hypothesis (I have not yet the ship scenario of the merchant who had this problem, so I can't reproduce it for now).

It made me also realize that nobody updated the module since I created it :)

 

When I will find the fix, I will push it on Github to update the official module.

If you're agree, I will push your fix too (http://www.prestashop.com/forums/topic/323053-fedex-carrier-module-error-868-service-not-allowed-how-to-fix/?do=findComment&comment=1634368)

Fabien

Link to comment
Share on other sites

Of course I agree, Fabien  :rolleyes:

Good luck with the re-development, it should be quite easy, as long as you set debugging on (and output XML request/response to header), use a developer FedEx account/meter etc. you will be able to make this FedEx module back to proper functionality quite quickly.

Link to comment
Share on other sites

  • 8 months later...
  • 1 month later...
  • 1 month later...
  • 4 weeks later...

Hi doclucas. Thank you very much for this great fix.. I managed to get it to work but I have a little problem with the prices, maybe its the currency.. My prices are currently looking like this ¥ 16

16Yen is really cheap and does not make any sense. 

My Default Currency is in Yen and my Fedex Account is also in Yen. 

Any idea what is causing such a problem.. 

Thank you so much .

 

Link to comment
Share on other sites

  • 8 months later...

Hi  - I am having a little different problem - the issue is my store is showing only One Carrier for paid orders but for free shipping it shows all of them. For some reason it is defaulting to that one carrier. I am using the Fedx and USPS modules.

Link to comment
Share on other sites

  • 1 month later...
  • 4 months later...
  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...