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 想问一下树莓派接上显示屏后出现如图所示画面,是什么问题导致的
  • ¥100 嵌入式系统基于PIC16F882和热敏电阻的数字温度计
  • ¥15 cmd cl 0x000007b
  • ¥20 BAPI_PR_CHANGE how to add account assignment information for service line
  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号