Domanda

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!

È stato utile?

Soluzione

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.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top