3

I have setup FedEx and DHL shipping modules in Magento 1.7.0.2 and my country of origin is United Kingdom. When I enable logging to the log file it displays an error similar to this:

2014-01-16T11:37:32+00:00 DEBUG (7): Array
(
    [request] => Array
        (
            [WebAuthenticationDetail] => Array
                (
                    [UserCredential] => Array
                        (
                            [Key] => Du7g4fjPU7X4yr4S
                            [Password] => 7TaHmEQyzOdxcxBLlspPIV8sJ
                        )

                )

            [ClientDetail] => Array
                (
                    [AccountNumber] => 510087062
                    [MeterNumber] => 118588382
                )

            [Version] => Array
                (
                    [ServiceId] => crs
                    [Major] => 10
                    [Intermediate] => 0
                    [Minor] => 0
                )

            [RequestedShipment] => Array
                (
                    [DropoffType] => REGULAR_PICKUP
                    [ShipTimestamp] => 2014-01-16T11:37:31+00:00
                    [PackagingType] => YOUR_PACKAGING
                    [TotalInsuredValue] => Array
                        (
                            [Amount] => 3
                            [Currency] => UKL
                        )

                    [Shipper] => Array
                        (
                            [Address] => Array
                                (
                                    [PostalCode] => SA129NG
                                    [CountryCode] => GB
                                )

                        )

                    [Recipient] => Array
                        (
                            [Address] => Array
                                (
                                    [PostalCode] => 21001
                                    [CountryCode] => DE
                                    [Residential] => 1
                                )

                        )

                    [ShippingChargesPayment] => Array
                        (
                            [PaymentType] => SENDER
                            [Payor] => Array
                                (
                                    [AccountNumber] => 510087062
                                    [CountryCode] => GB
                                )

                        )

                    [CustomsClearanceDetail] => Array
                        (
                            [CustomsValue] => Array
                                (
                                    [Amount] => 3
                                    [Currency] => UKL
                                )

                        )

                    [RateRequestTypes] => LIST
                    [PackageCount] => 1
                    [PackageDetail] => INDIVIDUAL_PACKAGES
                    [RequestedPackageLineItems] => Array
                        (
                            [0] => Array
                                (
                                    [Weight] => Array
                                        (
                                            [Value] => 3
                                            [Units] => LB
                                        )

                                    [GroupPackageCount] => 1
                                    [InsuredValue] => Array
                                        (
                                            [Amount] => 3
                                            [Currency] => UKL
                                        )

                                )

                        )

                )

        )

    [result] => stdClass Object
        (
            [HighestSeverity] => ERROR
            [Notifications] => stdClass Object
                (
                    [Severity] => ERROR
                    [Source] => prof
                    [Code] => 1000
                    [Message] => Authentication Failed
                )

            [Version] => stdClass Object
                (
                    [ServiceId] => crs
                    [Major] => 10
                    [Intermediate] => 0
                    [Minor] => 0
                )

        )

    [__pid] => 373
)

I have set up the FedEx account details (Account no, Developer Test Key, Test Meter Number and password) in the admin-side but it still throws the error:

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

Daniel Rose
  • 17,233
  • 9
  • 65
  • 88
drsndodiya
  • 1,685
  • 1
  • 17
  • 36
  • have you found any answer? I am facing the same issue with test mode .. if you got the answer than please let me know.. – Nishant Solanki Apr 25 '14 at 07:11
  • go through Zend\Http\Response::decodeChunkedBody and add following code there instead of current code public static function decodeChunkedBody($body) { $decBody = ''; if (preg_match("/^([\da-fA-F]+)[^\r\n]*\r\n/sm", trim($body))) { while (preg_match("/^([\da-fA-F]+)[^\r\n]*\r\n/sm", trim($body), $m)) { $length = hexdec(trim($m[1])); $cut = strlen($m[0]); $decBody .= substr($body, $cut, $length); $body = substr($body, $cut + $length + 2); } } else { return $body; } return $decBody; } @NishantSolanki – drsndodiya May 23 '14 at 04:25
  • I try above code and it's work for me.hope same will help to you – drsndodiya May 23 '14 at 04:26
  • thanks for your reply.. I was having issues with magento, but I sorted it out..cheers :-) – Nishant Solanki May 23 '14 at 06:16
  • okay be connected with me we can solve each other doubts – drsndodiya May 23 '14 at 06:34

1 Answers1

0

Assuming your credentials are correct, it looks like this was a temporary issue with the FedEx sandbox. I was experiencing the same problem but it appears to be working now.

Josh Wymer
  • 181
  • 1
  • 5
  • Hi I did some googling and find one solution may be it will help you @Josh – drsndodiya May 12 '14 at 10:06
  • and add following code there instead of current code public static function decodeChunkedBody($body) { $decBody = ''; if (preg_match("/^([\da-fA-F]+)[^\r\n]*\r\n/sm", trim($body))) { while (preg_match("/^([\da-fA-F]+)[^\r\n]*\r\n/sm", trim($body), $m)) { $length = hexdec(trim($m[1])); $cut = strlen($m[0]); $decBody .= substr($body, $cut, $length); $body = substr($body, $cut + $length + 2); } } else { return $body; } return $decBody; } @Josh – drsndodiya May 12 '14 at 10:09