Fedex没有使用Magento 1.9.1.0 + Ubuntu 14

时间:2015-01-23 06:08:29

标签: php magento soap ubuntu-14.04 magento-1.9.1

使用php 5.5&迁移到新的Ubuntu 14服务器Magento 1.9.1.0 from 1.7.0.2

联邦快递似乎没有提高利率。所有凭据都是从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
)

2 个答案:

答案 0 :(得分:0)

确保使用正确的API网址: 转到文件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'
);

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

答案 1 :(得分:0)

从1.7.0.2开始使用Fedex.php