2014-01-16 110 views
3

我已經在Magento 1.7.0.2中設置了聯邦快遞和DHL運輸模塊,我的原產國是英國。當我啓用記錄到日誌文件中會顯示類似這樣的錯誤:Magento 1.7.0.2聯邦快遞和DHL不工作

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 
) 

我已成立了聯邦快遞帳號細節在管理端(客戶沒有,開發測試鍵,測試儀表和密碼)但它仍然會拋出錯誤:

此送貨方式當前不可用。如果您想使用此送貨方式發貨,請與我們聯繫。

+0

你有沒有找到答案?我正面臨與測試模式相同的問題..如果您的答案比請讓我知道.. –

+0

通過Zend \ Http \ Response :: decodeChunkedBody並添加以下代碼,而不是當前代碼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

+0

我嘗試上面的代碼,它的工作對我..hope同樣會幫助你 – drsndodiya

回答

0

假設您的憑據是正確的,它看起來像是FedEx沙箱的一個臨時問題。我遇到了同樣的問題,但它似乎現在正在工作。

+0

嗨,我做了一些Google搜索,並找到一個解決方案可能會幫助你@Josh – drsndodiya

+0

去通過Zend \ Http \ Response :: decodeChunkedBody – drsndodiya

+0

並添加下面的代碼,而不是當前的代碼public static function decodeChunkedBody ($ body) \t { \t $ decBody =''; (preg_match(「/ ^([\ da-fA-F] +)[^ \ r \ n] * \ r \ n/sm」,trim($ body))){pref_match 「/ ^([\ da-fA-F] +)[^ \ r \ n] * \ r \ n/sm」,trim($ body),$ m)){ ($ M [1])); \t \t $ cut = strlen($ m [0]); \t \t \t $ decBody。= substr($ body,$ cut,$ length); \t \t $ body = substr($ body,$ cut + $ length + 2); \t} \t} else { \t return $ body; \t} \t \t return $ decBody; \t} @Josh – drsndodiya