Search code examples
magentosoapfedex

Magento 1.6 FedEx No Quotes


As you might know, there's FedEx Web Services API in Magento. But I still can't make it work. Entered all (password, account id, key and so on) in the admin end of the Magento. Still getting

This shipping method is currently unavailable. If you would like to ship using this shipping method, please contact us.

Tried to catch what's happening in code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php Right when the SOAP request is sent, line ~360:

    $requestString = serialize($ratesRequest);
    $response = $this->_getCachedQuotes($requestString);

Caught $requestString and $response. $response is always empty (print_r gives empty string), also tried to set "Sandbox mode" both Yes and No in the admin-end. The $requestString is:

a:4:{s:23:"WebAuthenticationDetail";a:1:{s:14:"UserCredential";a:2:{s:3:"Key";s:16:"KEY";s:8:"Password";s:6:"PASSWD";}}s:12:"ClientDetail";a:2:{s:13:"AccountNumber";s:9:"ACCNUMBER";s:11:"MeterNumber";s:9:"METER NUMBER";}s:7:"Version";a:4:{s:9:"ServiceId";s:3:"crs";s:5:"Major";s:1:"9";s:12:"Intermediate";s:1:"0";s:5:"Minor";s:1:"0";}s:17:"RequestedShipment";a:11:{s:11:"DropoffType";s:14:"REGULAR_PICKUP";s:13:"ShipTimestamp";s:25:"2011-12-08T20:33:05+00:00";s:13:"PackagingType";s:14:"YOUR_PACKAGING";s:17:"TotalInsuredValue";a:2:{s:7:"Ammount";d:129.06999999999999317878973670303821563720703125;s:8:"Currency";s:3:"USD";}s:7:"Shipper";a:1:{s:7:"Address";a:2:{s:10:"PostalCode";s:5:"07094";s:11:"CountryCode";s:2:"US";}}s:9:"Recipient";a:1:{s:7:"Address";a:3:{s:10:"PostalCode";s:5:"10033";s:11:"CountryCode";s:2:"US";s:11:"Residential";b:1;}}s:22:"ShippingChargesPayment";a:2:{s:11:"PaymentType";s:6:"SENDER";s:5:"Payor";a:2:{s:13:"AccountNumber";s:9:"368675440";s:11:"CountryCode";s:2:"US";}}s:16:"RateRequestTypes";s:4:"LIST";s:12:"PackageCount";s:1:"1";s:13:"PackageDetail";s:19:"INDIVIDUAL_PACKAGES";s:25:"RequestedPackageLineItems";a:1:{i:0;a:1:{s:6:"Weight";a:2:{s:5:"Value";d:145.3600000000000136424205265939235687255859375;s:5:"Units";s:2:"LB";}}}}}

(replaced actual password, key and so on, don't want them public).

Guys, what the matter? How to fix this? I summon Magento 1.6 FedEx gurus! Guess I'm not the only one who has such problem!


Solution

  • OK, actually I caought the wrong response (later in code, if response is empty, Magento tries to make SOAP-request to FedEx Server). And then it crashed with SOAP error: it's not installed on server.

    To fix this you should install SOAP and OpenSSL to your server. If you use WHM-powered server (my case), you should recompile the package (WHM -> Software -> Easy Apache). After that magento 1.6 is ready for FedEx.

    Please also notice that there was no support for the new FedEx API (but there was for the deprecated one), so if you plan to use FedEx with Magento, you HAVE to update it to 1.6.x or greater AND have SOAP and SSL installed on your server..