【问题标题】:Fedex not working on Magento 1.9.1.0 + Ubuntu 14Fedex 无法在 Magento 1.9.1.0 + Ubuntu 14 上运行
【发布时间】:2015-01-23 06:08:28
【问题描述】:

从 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
)

【问题讨论】:

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


    【解决方案1】:

    确保您使用的是正确的 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'
    );
    

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

    【讨论】:

    • 另外,你能把var/logs/exceptions.log的输出放上去吗? (如果存在)
    【解决方案2】:

    从 1.7.0.2 开始使用 Fedex.php

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2017-07-24
      • 1970-01-01
      • 2015-07-20
      • 2014-10-20
      • 2012-09-27
      • 2019-07-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多