【问题标题】:Need to Integrate UPS Freight Shipping to Woocommerce UPS plugin需要将 UPS Freight Shipping 集成到 Woocommerce UPS 插件
【发布时间】:2012-10-09 10:01:31
【问题描述】:

连接到 UPS Freight 测试服务器的正确 URL 是什么? Developers Kit pdf 中提供的 url 不起作用。有谁知道哪些 url 用于测试目的?

这是插件的示例代码:

/**
     * Shipping method class
     * */
    class WC_Shipping_UPS extends WC_Shipping_Method {

        var $test_url = "https://wwwcie.ups.com/webservices/FreightRate";
        /* var $url = "https://onlinetools.ups.com/webservices/FreightShip"; */
        var $codes = array(
            "01" => "UPS Next Day Air",
            "02" => "UPS Second Day Air",

【问题讨论】:

  • 你的代码在这里不完整。

标签: e-commerce shipping ups woocommerce


【解决方案1】:
protected static $endpointUrls = array(
    'sandbox' => 'https://wwwcie.ups.com/webservices/FreightRate',
    'production' => 'https://onlinetools.ups.com/webservices/FreightRate'
);

这些是正确的 url,从 UPS 的 Freight Shipping API 的 wsdl 文件中复制。

【讨论】:

    【解决方案2】:

    很遗憾,您尝试使用 XML 服务来处理 FreightRate,但您无法做到。您只能使用他们的网络服务(根据此论坛帖子 (https://developerkitcommunity.ups.com/index.php/Special:AWCforum/st/id192/),您只能通过网络服务提供 FreightRate,因此您必须走 SOAP 路线并编写自己的插件。

    祝你好运。

    【讨论】:

      猜你喜欢
      • 2019-03-01
      • 1970-01-01
      • 1970-01-01
      • 2019-01-08
      • 1970-01-01
      • 2012-07-18
      • 1970-01-01
      • 1970-01-01
      • 2012-12-12
      相关资源
      最近更新 更多