Fedex无法在Magento 1.9.1.0 + Ubuntu 14上运行


Fedex not working on Magento 1.9.1.0 + Ubuntu 14

从 1.7.0.2 迁移到带有 php 5.5 和 Magento 1.9.1.0 的新 Ubuntu 14 服务器

联邦快递似乎没有拉动利率。1.7.0.2 中的所有凭据都相同

我已经在调试中显示了下面的日志文件。

已安装最新版本的 SOAP。

2015-01-23T06:02:37+00:00 DEBUG (7): Array
(
    [request] => Array
        (
            [WebAuthenticationDetail] => Array
                (
                    [UserCredential] => Array
                        (
                            [Key] => TX9aAheEUqPV5Bej
                            [Password] => lFi0xCAVSEkzxP2L52RSfu7uP4
                        )
                )
            [ClientDetail] => Array
                (
                    [AccountNumber] => 495055147
                    [MeterNumber] => 121492979
                )
            [Version] => Array
                (
                    [ServiceId] => crs
                    [Major] => 10
                    [Intermediate] => 0
                    [Minor] => 0
                )
            [RequestedShipment] => Array
                (
                    [DropoffType] => BUSINESS_SERVICE_CENTER
                    [ShipTimestamp] => 2015-01-23T06:02:37+00:00
                    [PackagingType] => YOUR_PACKAGING
                    [TotalInsuredValue] => Array
                        (
                            [Amount] => 76.28
                            [Currency] => USD
                        )
                    [Shipper] => Array
                        (
                            [Address] => Array
                                (
                                    [PostalCode] => 92614
                                    [CountryCode] => US
                                )
                        )
                    [Recipient] => Array
                        (
                            [Address] => Array
                                (
                                    [PostalCode] => 92804
                                    [CountryCode] => US
                                    [Residential] => 1
                                )
                        )
                    [ShippingChargesPayment] => Array
                        (
                            [PaymentType] => SENDER
                            [Payor] => Array
                                (
                                    [AccountNumber] => 495033147
                                    [CountryCode] => US
                                )
                        )
                    [CustomsClearanceDetail] => Array
                        (
                            [CustomsValue] => Array
                                (
                                    [Amount] => 76.28
                                    [Currency] => USD
                                )
                        )
                    [RateRequestTypes] => LIST
                    [PackageCount] => 1
                    [PackageDetail] => INDIVIDUAL_PACKAGES
                    [RequestedPackageLineItems] => Array
                        (
                            [0] => Array
                                (
                                    [Weight] => Array
                                        (
                                            [Value] => 2.6
                                            [Units] => 
                                        )
                                    [GroupPackageCount] => 1
                                    [InsuredValue] => Array
                                        (
                                            [Amount] => 76.28
                                            [Currency] => USD
                                        )
                                )
                        )
                )
        )
    [result] => Array
        (
            [error] => Fault
            [code] => 0
        )
    [__pid] => 2875
)
2015-01-23T06:02:39+00:00 DEBUG (7): Array
(
    [request] => Array
        (
            [WebAuthenticationDetail] => Array
                (
                    [UserCredential] => Array
                        (
                            [Key] => TX9aAheEUqPV3Bej
                            [Password] => lFi0xCn7JkzxP2L52RSfu7uP4
                        )
                )
            [ClientDetail] => Array
                (
                    [AccountNumber] => 495033147
                    [MeterNumber] => 107492979
                )
            [Version] => Array
                (
                    [ServiceId] => crs
                    [Major] => 10
                    [Intermediate] => 0
                    [Minor] => 0
                )
            [RequestedShipment] => Array
                (
                    [DropoffType] => BUSINESS_SERVICE_CENTER
                    [ShipTimestamp] => 2015-01-23T06:02:39+00:00
                    [PackagingType] => YOUR_PACKAGING
                    [TotalInsuredValue] => Array
                        (
                            [Amount] => 76.28
                            [Currency] => USD
                        )
                    [Shipper] => Array
                        (
                            [Address] => Array
                                (
                                    [PostalCode] => 92614
                                    [CountryCode] => US
                                )
                        )
                    [Recipient] => Array
                        (
                            [Address] => Array
                                (
                                    [PostalCode] => 92804
                                    [CountryCode] => US
                                    [Residential] => 1
                                )
                        )
                    [ShippingChargesPayment] => Array
                        (
                            [PaymentType] => SENDER
                            [Payor] => Array
                                (
                                    [AccountNumber] => 495033147
                                    [CountryCode] => US
                                )
                        )
                    [CustomsClearanceDetail] => Array
                        (
                            [CustomsValue] => Array
                                (
                                    [Amount] => 76.28
                                    [Currency] => USD
                                )
                        )
                    [RateRequestTypes] => LIST
                    [PackageCount] => 1
                    [PackageDetail] => INDIVIDUAL_PACKAGES
                    [RequestedPackageLineItems] => Array
                        (
                            [0] => Array
                                (
                                    [Weight] => Array
                                        (
                                            [Value] => 2.6
                                            [Units] => 
                                        )
                                    [GroupPackageCount] => 1
                                    [InsuredValue] => Array
                                        (
                                            [Amount] => 76.28
                                            [Currency] => USD
                                        )
                                )
                        )
                )
        )
    [result] => Array
        (
            [error] => Fault
            [code] => 0
        )
    [__pid] => 2866
)

确保您使用的是正确的 API URL:转到文件app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php

并检查第 135 行。如果它看起来像这样:

$client->__setLocation($this->getConfigFlag('sandbox_mode')
    ? 'https://wsbeta.fedex.com:443/web-services/rate'
    : 'https://ws.fedex.com:443/web-services/rate'
);

暂时将其更改为:

$client->__setLocation($this->getConfigFlag('sandbox_mode')
    ? 'https://wsbeta.fedex.com:443/web-services'
    : 'https://ws.fedex.com:443/web-services'
);

如果它有效,您应该使用自己的模块扩展模型,以正确覆盖 url,或者将文件复制到 app/code/local/Mage/Usa/Model/Shipping/Carrier/Fedex.php

与 Fedex 合作.php从 1.7.0.2 开始