douniewei6346 2013-04-01 20:49
浏览 149
已采纳

UPS Api - php,我该怎么走? [关闭]

I have downloaded the UPS apis for both shipping and rates. The zips contain multiple docs some of which are hundreds of pages long. The zips also contain sample code, however, they are missing information needed to run successfully, i.e. Url endpoints, location of wsdl files... etc.

I have found enough information looking through stackoverflow posts to make the sample code work, though I am at a loss as to how I would build out my own soap calls needed for my business logic.

I have looked through the .wsdl files and cannot determine what parameters need to be sent and what options/methods are available to call.

For example, in the sample code there is the following:

  $option['RequestOption'] = 'Shop';
  $request['Request'] = $option;

If I change Shop to another value I receive an error saying invalid request. Is this the only request that can be made for the Rate service? Where do I find the available requests to choose from and the data expected / returned?

Another example is the operation value: $operation = "ProcessRate"; In the wsdl I have found ProcessRate though there is very little information about input/output... unless im missing something

<wsdl:operation name="ProcessRate"><soap:operation soapAction="http://onlinetools.ups.com/webservices/RateBinding/v1.1" style="document"/><wsdl:input name="RateRequest"><soap:body parts="Body" use="literal"/><soap:header message="tns:RateRequestMessage" part="UPSSecurity" use="literal"><soap:headerfault message="tns:RateErrorMessage" part="RateError" use="literal"/></soap:header></wsdl:input><wsdl:output name="RateResponse"><soap:body parts="Body" use="literal"/></wsdl:output><wsdl:fault name="RateError"><soap:fault name="RateError" use="literal"/></wsdl:fault></wsdl:operation>

My goal is to make a call to determine shipping costs based on the amount of items a user has purchased. Any info / direction would be greatly appreciated!

  • 写回答

1条回答 默认 最新

  • dongyuluan7494 2013-04-01 20:54
    关注

    Have you checked out their Developer Resource Center?

    It provides links to:

    Contact for UPS Developer Support

    Send UPS an email with your question and attach a file with your code and error messages using the link below. Our goal is to reply to your message within four hours during support business hours: Monday through Friday, 8 a.m. - 9 p.m. EST. E-mail UPS

    You might get better/quicker support through one of the above channels.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 BP神经网络控制倒立摆
  • ¥20 要这个数学建模编程的代码 并且能完整允许出来结果 完整的过程和数据的结果
  • ¥15 html5+css和javascript有人可以帮吗?图片要怎么插入代码里面啊
  • ¥30 Unity接入微信SDK 无法开启摄像头
  • ¥20 有偿 写代码 要用特定的软件anaconda 里的jvpyter 用python3写
  • ¥20 cad图纸,chx-3六轴码垛机器人
  • ¥15 移动摄像头专网需要解vlan
  • ¥20 access多表提取相同字段数据并合并
  • ¥20 基于MSP430f5529的MPU6050驱动,求出欧拉角
  • ¥20 Java-Oj-桌布的计算