UPS API Error: Invalid Ship Request Document - php

I'm trying to run the PHP test for the UPS Freight Shipping API that came with the official UPS SDK. I finally got it to connect to the SOAP service with a correct username, password, and API key, but now I'm getting an error that I don't know how to solve. The error coming back from the server is
Invalid Ship Request Document
The full response from the server looks like this:
SoapFault Object
(
[message:protected] => An exception has been raised as a result of client data.
[string:private] =>
[code:protected] => 0
[file:protected] => /my_home_dir/UPS_API/test.php
[line:protected] => 224
[trace:private] => Array
(
[0] => Array
(
[file] => /my_home_dir/UPS_API/test.php
[line] => 224
[function] => __soapCall
[class] => SoapClient
[type] => ->
[args] => Array
(
[0] => ProcessFreightRate
[1] => Array
(
[0] => Array
(
[Request] => Array
(
[RequestOption] => RateChecking Option
)
[ShipFrom] => Array
(
[Name] => Good Incorporation
[Address] => Array
(
[AddressLine] => 2010 WARSAW ROAD
[City] => Roswell
[StateProvinceCode] => GA
[PostalCode] => 30076
[CountryCode] => US
)
)
[ShipTo] => Array
(
[Name] => Sony Company Incorporation
[Address] => Array
(
[AddressLine] => 2311 YORK ROAD
[City] => TIMONIUM
[StateProvinceCode] => MD
[PostalCode] => 21093
[CountryCode] => US
)
)
[PaymentInformation] => Array
(
[Payer] => Array
(
[Name] => Payer inc
[Address] => Array
(
[AddressLine] => 435 SOUTH STREET
[City] => RIS TOWNSHIP
[StateProvinceCode] => NJ
[PostalCode] => 07960
[CountryCode] => US
)
)
[ShipmentBillingOption] => Array
(
[Code] => 10
[Description] => PREPAID
)
)
[Service] => Array
(
[Code] => 308
[Description] => UPS Freight LTL
)
[HandlingUnitOne] => Array
(
[Quantity] => 20
[Type] => Array
(
[Code] => PLT
[Description] => PALLET
)
)
[Commodity] => Array
(
[CommodityID] =>
[Description] => No Description
[Weight] => Array
(
[UnitOfMeasurement] => Array
(
[Code] => LBS
[Description] => Pounds
)
[Value] => 750
)
[Dimensions] => Array
(
[UnitOfMeasurement] => Array
(
[Code] => IN
[Description] => Inches
)
[Length] => 23
[Width] => 17
[Height] => 45
)
[NumberOfPieces] => 45
[PackagingType] => Array
(
[Code] => BAG
[Description] => BAG
)
[DangerousGoodsIndicator] =>
[CommodityValue] => Array
(
[CurrencyCode] => USD
[MonetaryValue] => 5670
)
[FreightClass] => 60
[NMFCCommodityCode] =>
)
[ShipmentServiceOptions] => Array
(
[PickupOptions] => Array
(
[HolidayPickupIndicator] =>
[InsidePickupIndicator] =>
[ResidentialPickupIndicator] =>
[WeekendPickupIndicator] =>
[LiftGateRequiredIndicator] =>
)
[OverSeasLeg] => Array
(
[Dimensions] => Array
(
[Volume] => 20
[UnitOfMeasurement] => Array
(
[Code] => CF
[Description] => String
)
)
[Value] => Array
(
[Cube] => Array
(
[CurrencyCode] => USD
[MonetaryValue] => 5670
)
)
[COD] => Array
(
[CODValue] => Array
(
[CurrencyCode] => USD
[MonetaryValue] => 363
)
[CODPaymentMethod] => Array
(
[Code] => M
[Description] => For Company Check
)
[CODBillingOption] => Array
(
[Code] => 01
[Description] => Prepaid
)
[RemitTo] => Array
(
[Name] => RemitToSomebody
[Address] => Array
(
[AddressLine] => 640 WINTERS AVE
[City] => PARAMUS
[StateProvinceCode] => NJ
[PostalCode] => 07652
[CountryCode] => US
)
[AttentionName] => C J Parker
)
)
[DangerousGoods] => Array
(
[Name] => Very Safe
[Phone] => Array
(
[Number] => 453563321
[Extension] => 1111
)
[TransportationMode] => Array
(
[Code] => CARGO
[Description] => Cargo Mode
)
)
[SortingAndSegregating] => Array
(
[Quantity] => 23452
)
[CustomsValue] => Array
(
[CurrencyCode] => USD
[MonetaryValue] => 23457923
)
[HandlingCharge] => Array
(
[Amount] => Array
(
[CurrencyCode] => USD
[MonetaryValue] => 450
)
)
)
)
)
)
)
)
)
[faultstring] => An exception has been raised as a result of client data.
[faultcode] => Client
[faultcodens] => http://schemas.xmlsoap.org/soap/envelope/
[detail] => stdClass Object
(
[Errors] => stdClass Object
(
[ErrorDetail] => stdClass Object
(
[Severity] => Hard
[PrimaryErrorCode] => stdClass Object
(
[Code] => 9121000
[Description] => Invalid Ship Request Document
)
)
)
)
)
The code that I am using to make the request can be found here (credentials have been removed for security): http://pastebin.com/Yw7sPQdg

Turns out that I was pointing to the wrong end point. The endpoint url for freight rates should be: https://wwwcie.ups.com/webservices/FreightRate

Related

Get flight's logo images in a flight list using flight offer price API

I want to show flight's logo images in a flight list using flight offer price API:
https://developers.amadeus.com/self-service/category/air/api-doc/flight-offers-search/api-reference.
I search for flights using origin and destination, one way or round trip, etc. But the flight logo image is not available in the result. Is there a way I can get the flight logo image using the "flight-offers-search" API?
I have used bellow API URL to get flight offer price
This is my request URL
https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=MAN&destinationLocationCode=LAX&departureDate=2021-07-29&adults=1&travelClass=ECONOMY¤cyCode=USD&max=100
This is my API response. there is no flight logo image available in the response.
stdClass Object
(
[meta] => stdClass Object
(
[count] => 93
[links] => stdClass Object
(
[self] => https://test.api.amadeus.com/v2/shopping/flight-offers?originLocationCode=MAN&destinationLocationCode=LAX&departureDate=2021-07-29&adults=1&travelClass=ECONOMY¤cyCode=USD&max=100
)
)
[data] => Array
(
[0] => stdClass Object
(
[type] => flight-offer
[id] => 1
[source] => GDS
[instantTicketingRequired] =>
[nonHomogeneous] =>
[oneWay] =>
[lastTicketingDate] => 2021-07-29
[numberOfBookableSeats] => 4
[itineraries] => Array
(
[0] => stdClass Object
(
[duration] => PT29H42M
[segments] => Array
(
[0] => stdClass Object
(
[departure] => stdClass Object
(
[iataCode] => MAN
[terminal] => 1
[at] => 2021-07-29T10:40:00
)
[arrival] => stdClass Object
(
[iataCode] => LIS
[terminal] => 1
[at] => 2021-07-29T13:30:00
)
[carrierCode] => TP
[number] => 1317
[aircraft] => stdClass Object
(
[code] => 32N
)
[operating] => stdClass Object
(
[carrierCode] => TP
)
[duration] => PT2H50M
[id] => 152
[numberOfStops] => 0
[blacklistedInEU] =>
)
[1] => stdClass Object
(
[departure] => stdClass Object
(
[iataCode] => LIS
[terminal] => 1
[at] => 2021-07-29T18:30:00
)
[arrival] => stdClass Object
(
[iataCode] => EWR
[terminal] => B
[at] => 2021-07-29T21:30:00
)
[carrierCode] => TP
[number] => 207
[aircraft] => stdClass Object
(
[code] => 32Q
)
[operating] => stdClass Object
(
[carrierCode] => TP
)
[duration] => PT8H
[id] => 153
[numberOfStops] => 0
[blacklistedInEU] =>
)
[2] => stdClass Object
(
[departure] => stdClass Object
(
[iataCode] => JFK
[terminal] => 5
[at] => 2021-07-30T05:30:00
)
[arrival] => stdClass Object
(
[iataCode] => LAX
[terminal] => 3
[at] => 2021-07-30T08:22:00
)
[carrierCode] => TP
[number] => 4325
[aircraft] => stdClass Object
(
[code] => 32S
)
[operating] => stdClass Object
(
[carrierCode] => B6
)
[duration] => PT5H52M
[id] => 154
[numberOfStops] => 0
[blacklistedInEU] =>
)
)
)
)
[price] => stdClass Object
(
[currency] => USD
[total] => 845.85
[base] => 581.00
[fees] => Array
(
[0] => stdClass Object
(
[amount] => 0.00
[type] => SUPPLIER
)
[1] => stdClass Object
(
[amount] => 0.00
[type] => TICKETING
)
)
[grandTotal] => 845.85
)
[pricingOptions] => stdClass Object
(
[fareType] => Array
(
[0] => PUBLISHED
)
[includedCheckedBagsOnly] => 1
)
[validatingAirlineCodes] => Array
(
[0] => TP
)
[travelerPricings] => Array
(
[0] => stdClass Object
(
[travelerId] => 1
[fareOption] => STANDARD
[travelerType] => ADULT
[price] => stdClass Object
(
[currency] => USD
[total] => 845.85
[base] => 581.00
)
[fareDetailsBySegment] => Array
(
[0] => stdClass Object
(
[segmentId] => 152
[cabin] => ECONOMY
[fareBasis] => LUKBSI0D
[class] => L
[includedCheckedBags] => stdClass Object
(
[quantity] => 1
)
)
[1] => stdClass Object
(
[segmentId] => 153
[cabin] => ECONOMY
[fareBasis] => LUKBSI0D
[class] => L
[includedCheckedBags] => stdClass Object
(
[quantity] => 1
)
)
[2] => stdClass Object
(
[segmentId] => 154
[cabin] => ECONOMY
[fareBasis] => LUKBSI0D
[brandedFare] => BASIC
[class] => L
[includedCheckedBags] => stdClass Object
(
[quantity] => 1
)
)
)
)
)
)
Or anyone know if there are any other api's that I can use to get the logos?
Please help to get flight logo using Amadeus API
I have used Amadeus test API
Thank you

PHP paypal commerce platform(api v2) partner is not getting paid?

Paypal Commerce platform in php order capture partner is not getting paid and seller is getting full amount. What should I send in order capture?
Below is the array I am sending in 'https://api.paypal.com/v2/checkout/orders'
Array
(
[intent] => CAPTURE
[purchase_units] => Array
(
[0] => Array
(
[reference_id] =>
[description] => Darshan Shah 70099
[custom_id] => 10541
[soft_descriptor] =>
[invoice_id] => SELLERINV-70099
[amount] => Array
(
[currency_code] => USD
[value] => 105
[breakdown] => Array
(
[item_total] => Array
(
[currency_code] => USD
[value] => 100
)
[shipping] => Array
(
[currency_code] => USD
[value] => 5
)
[tax_total] => Array
(
[currency_code] => USD
[value] => 0
)
)
)
[items] => Array
(
[0] => Array
(
[name] => Test Product K
[description] => Test Product K
[unit_amount] => Array
(
[currency_code] => USD
[value] => 50
)
[tax] => Array
(
[currency_code] => USD
[value] => 0
)
[quantity] => 2
[category] => DIGITAL_GOODS
)
)
[payee] => Array
(
[merchant_id] =>
)
[shipping] => Array
(
[name] => Array
(
[full_name] => Darshan Shah
)
[address] => Array
(
[address_line_1] => 5/11 G1 Rajalakshmi Enclave
[address_line_2] =>
[admin_area_2] => Middleton Grange
[admin_area_1] => CON
[postal_code] => 111111
[country_code] => GB
)
)
[payment_instruction] => Array
(
[disbursement_mode] => INSTANT
[platform_fees] => Array
(
[0] => Array
(
[amount] => Array
(
[currency_code] => USD
[value] => 5
)
[payee] => Array
(
[merchant_id] =>
)
)
)
)
)
)
[application_context] => Array
(
[brand_name] =>
[locale] => en-US
[landing_page] => BILLING
[shipping_preference] => GET_FROM_FILE
[user_action] => PAY_NOW
[return_url] =>
[cancel_url] =>
)
)
What data should I send in order capture? 'https://api.paypal.com/v2/checkout/orders//capture'. As currently, I am not sending any data in order capture.
I am using above 2 apis to do checkout and pay both seller and parter. But Only seller is getting full amount, partner is not getting anything!
If have hoped on this kind of issue, please suggest me a solution.

Multidimensional Array PHP Output Values as a row [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 8 years ago.
Improve this question
This is my array
Array
(
[TrackResponse] => Array
(
[Response] => Array
(
[TransactionReference] => Array
(
[CustomerContext] => RocketShipIt
)
[ResponseStatusCode] => 1
[ResponseStatusDescription] => Success
)
[Shipment] => Array
(
[Shipper] => Array
(
[ShipperNumber] => 746354
[Address] => Array
(
[AddressLine1] => 11 PINE ST
[City] => NEW BEDFORD
[StateProvinceCode] => MA
[PostalCode] => 01032 9785
[CountryCode] => US
)
)
[ShipTo] => Array
(
[Address] => Array
(
[City] => FOUNTAIN HILLS
[StateProvinceCode] => AZ
[PostalCode] => 85268
[CountryCode] => US
)
)
[ShipmentWeight] => Array
(
[UnitOfMeasurement] => Array
(
[Code] => LBS
)
[Weight] => 1.00
)
[Service] => Array
(
[Code] => 003
[Description] => GROUND
)
[ShipmentIdentificationNumber] => 746463772264354327
[PickupDate] => 20140709
[DeliveryDateUnavailable] => Array
(
[Type] => Scheduled Delivery
[Description] => Scheduled Delivery Date is not currently available, please try back later
)
[Package] => Array
(
[TrackingNumber] => 746463772264354327
[Activity] => Array
(
[0] => Array
(
[ActivityLocation] => Array
(
[Address] => Array
(
[City] => FOUNTAIN HILLS
[StateProvinceCode] => AZ
[PostalCode] => 85268
[CountryCode] => US
)
[Code] => ML
[Description] => FRONT DOOR
)
[Status] => Array
(
[StatusType] => Array
(
[Code] => D
[Description] => DELIVERED
)
[StatusCode] => Array
(
[Code] => FS
)
)
[Date] => 20140716
[Time] => 142400
)
[1] => Array
(
[ActivityLocation] => Array
(
[Address] => Array
(
[City] => TEMPE
[StateProvinceCode] => AZ
[CountryCode] => US
)
)
[Status] => Array
(
[StatusType] => Array
(
[Code] => I
[Description] => OUT FOR DELIVERY
)
[StatusCode] => Array
(
[Code] => DS
)
)
[Date] => 20140716
[Time] => 041900
)
[2] => Array
(
[ActivityLocation] => Array
(
[Address] => Array
(
[City] => TEMPE
[StateProvinceCode] => AZ
[CountryCode] => US
)
)
[Status] => Array
(
[StatusType] => Array
(
[Code] => I
[Description] => ARRIVAL SCAN
)
[StatusCode] => Array
(
[Code] => AR
)
)
[Date] => 20140715
[Time] => 114500
)
[3] => Array
(
[ActivityLocation] => Array
(
[Address] => Array
(
[City] => HODGKINS
[StateProvinceCode] => IL
[CountryCode] => US
)
)
[Status] => Array
(
[StatusType] => Array
(
[Code] => I
[Description] => DEPARTURE SCAN
)
[StatusCode] => Array
(
[Code] => DP
)
)
[Date] => 20140711
[Time] => 144600
)
[4] => Array
(
[ActivityLocation] => Array
(
[Address] => Array
(
[City] => HODGKINS
[StateProvinceCode] => IL
[CountryCode] => US
)
)
[Status] => Array
(
[StatusType] => Array
(
[Code] => I
[Description] => LOCATION SCAN
)
[StatusCode] => Array
(
[Code] => LC
)
)
[Date] => 20140711
[Time] => 090500
)
[5] => Array
(
[ActivityLocation] => Array
(
[Address] => Array
(
[City] => HODGKINS
[StateProvinceCode] => IL
[CountryCode] => US
)
)
[Status] => Array
(
[StatusType] => Array
(
[Code] => I
[Description] => UNLOAD SCAN
)
[StatusCode] => Array
(
[Code] => UL
)
)
[Date] => 20140711
[Time] => 085300
)
[6] => Array
(
[ActivityLocation] => Array
(
[Address] => Array
(
[City] => HODGKINS
[StateProvinceCode] => IL
[CountryCode] => US
)
)
[Status] => Array
(
[StatusType] => Array
(
[Code] => I
[Description] => ARRIVAL SCAN
)
[StatusCode] => Array
(
[Code] => AR
)
)
[Date] => 20140711
[Time] => 061900
)
[7] => Array
(
[ActivityLocation] => Array
(
[Address] => Array
(
[City] => W SPRINGFIELD
[StateProvinceCode] => MA
[CountryCode] => US
)
)
[Status] => Array
(
[StatusType] => Array
(
[Code] => I
[Description] => DEPARTURE SCAN
)
[StatusCode] => Array
(
[Code] => DP
)
)
[Date] => 20140709
[Time] => 213400
)
[8] => Array
(
[ActivityLocation] => Array
(
[Address] => Array
(
[City] => W SPRINGFIELD
[StateProvinceCode] => MA
[CountryCode] => US
)
)
[Status] => Array
(
[StatusType] => Array
(
[Code] => I
[Description] => ORIGIN SCAN
)
[StatusCode] => Array
(
[Code] => OR
)
)
[Date] => 20140709
[Time] => 183400
)
[9] => Array
(
[ActivityLocation] => Array
(
[Address] => Array
(
[City] => W SPRINGFIELD
[StateProvinceCode] => MA
[CountryCode] => US
)
)
[Status] => Array
(
[StatusType] => Array
(
[Code] => P
[Description] => PICKUP SCAN
)
[StatusCode] => Array
(
[Code] => PU
)
)
[Date] => 20140709
[Time] => 163200
)
[10] => Array
(
[ActivityLocation] => Array
(
[Address] => Array
(
[CountryCode] => US
)
)
[Status] => Array
(
[StatusType] => Array
(
[Code] => M
[Description] => BILLING INFORMATION RECEIVED
)
[StatusCode] => Array
(
[Code] => MP
)
)
[Date] => 20140709
[Time] => 112842
)
)
[PackageWeight] => Array
(
[UnitOfMeasurement] => Array
(
[Code] => LBS
)
[Weight] => 1.00
)
)
)
)
)
I'm looking to access values in the Activity numeric indexed array like such.
foreach($response as $row)
{
foreach($row['Shipment']['Package'] as $k)
{
echo $k['ActivityLocation']['Address']['City'];
}
}
I wanna be able to access the values inside of the numeric keyed array, and print them out in a row 1-10 etc.
The error i'm getting is Fatal error: Cannot use string offset as an array in test.php on line 287
If anybody could help me solve this you would be the bestus!
Please and Thanks
foreach($row['Shipment']['Package'] as $k)
{
echo $k['ActivityLocation']['Address']['City'];
}

parsing xml array response in PHP objects

i am working on a UPS tracking API, i have called the API to track the package, i am getting the right response, but in array format, i am new to json decoding, please tell me how to parse this in PHP, do i have to create multiple objects in PHP? i am attaching the output as well as the PHP code.
PHP Code
if (isset($_POST['af0'])) {
if (preg_match('/^[a-z\d_]{4,80}$/i', $_POST['trackingNumber'])) {
$cleanTrackingNumber = $_POST['trackingNumber'];
$someArray = upsTrack("$cleanTrackingNumber");
echo '<pre>'; print_r($someArray); echo '</pre>';
} else {
echo 'Invalid tracking number... sigh...';
}
}
Output
Array
(
[TRACKRESPONSE] => Array
(
[RESPONSE] => Array
(
[TRANSACTIONREFERENCE] => Array
(
[XPCIVERSION] => 1.0
)
[RESPONSESTATUSCODE] => 1
[RESPONSESTATUSDESCRIPTION] => Success
)
[SHIPMENT] => Array
(
[SHIPPER] => Array
(
[SHIPPERNUMBER] => A6161A
[ADDRESS] => Array
(
[ADDRESSLINE1] => 132 E 43RD ST
[CITY] => NEW YORK
[STATEPROVINCECODE] => NY
[POSTALCODE] => 10017 4019
[COUNTRYCODE] => US
)
)
[SHIPTO] => Array
(
[ADDRESS] => Array
(
[CITY] => TORONTO
[STATEPROVINCECODE] => ON
[POSTALCODE] => M5V3X1
[COUNTRYCODE] => CA
)
)
[SHIPMENTWEIGHT] => Array
(
[UNITOFMEASUREMENT] => Array
(
[CODE] => LBS
)
[WEIGHT] => 3.20
)
[SERVICE] => Array
(
[CODE] => 011
[DESCRIPTION] => STANDARD
)
[REFERENCENUMBER] => Array
(
[CODE] => 13
[VALUE] => A6161AD9HPK
)
[SHIPMENTIDENTIFICATIONNUMBER] => 1ZA6161A6832763249
[PICKUPDATE] => 20140519
[SCHEDULEDDELIVERYDATE] => 20140521
[PACKAGE] => Array
(
[TRACKINGNUMBER] => 1ZA6161A6832763249
[ACTIVITY] => Array
(
[ACTIVITYLOCATION] => Array
(
[ADDRESS] => Array
(
[CITY] => SECAUCUS
[STATEPROVINCECODE] => NJ
[COUNTRYCODE] => US
)
)
[STATUS] => Array
(
[STATUSTYPE] => Array
(
[CODE] => I
[DESCRIPTION] => DEPARTURE SCAN
)
[STATUSCODE] => Array
(
[CODE] => DP
)
)
[DATE] => 20140520
[TIME] => 053000
)
[MESSAGE] => Array
(
[CODE] => 01
[DESCRIPTION] => On Time
)
[PACKAGEWEIGHT] => Array
(
[UNITOFMEASUREMENT] => Array
(
[CODE] => LBS
)
[WEIGHT] => 3.20
)
[REFERENCENUMBER] => Array
(
[CODE] => 19
[VALUE] => MMTD71EUY061A
)
)
)
)
)
If you already have the output in Array format then you don't have anything more to do with json decoding.
You can use $someArray to get any data from the array.
It's up to you if you want to just display it or save it, for example in a database.
What is it you trying to accomplish?

UPS Shipping API Integration Error (PHP)

I download the ShippingGroundFreightWebService PHP examples from UPS.com. I got following error message:
SoapFault Object
(
[message:protected] => An exception has been raised as a result of client data.
[string:private] =>
[code:protected] => 0
[file:protected] => /home5/vizparts/public_html/PHP/SoapGroundFreightShipClient.php
[line:protected] => 193
[trace:private] => Array
(
[0] => Array
(
[file] => /home5/vizparts/public_html/PHP/SoapGroundFreightShipClient.php
[line] => 193
[function] => __soapCall
[class] => SoapClient
[type] => ->
[args] => Array
(
[0] => ProcessShipment
[1] => Array
(
[0] => Array
(
[Request] => Array
(
[RequestOption] => Array
(
[0] => 1
[1] => Shipping
)
)
[Shipment] => Array
(
[ShipFrom] => Array
(
[Name] => Pat Stewart
[TaxIdentification] => 1234567890
[Address] => Array
(
[AddressLine] => 2311 York Road
[City] => Timonium
[StateProvinceCode] => MD
[PostalCode] => 21093
[CountryCode] => US
)
[AttentionName] => String
[Phone] => Array
(
[Number] => 6785851000
[Extension] => 123
)
)
[ShipperNumber] => 222006
[ShipTo] => Array
(
[Name] => Superman
[Address] => Array
(
[AddressLine] => 2010 Warsaw Road
[StateProvinceCode] => GA
[PostalCode] => 30076
[CountryCode] => US
[City] => Roswell
)
[AttentionName] => String
[Phone] => Array
(
[Number] => 6785851000
[Extention] => 111
)
)
[PaymentInformation] => Array
(
[Payer] => Array
(
[Name] => Superman
[Address] => Array
(
[AddressLine] => 2010 Warsaw Road
[City] => Roswell
[StateProvinceCode] => GA
[PostalCode] => 30075
[CountryCode] => US
)
[ShipperNumber] => 00613270
[AttentionName] => String
[Phone] => Array
(
[Number] => 6785851000
)
)
[ShipmentBillingOption] => Array
(
[Code] => 10
[Description] => String
)
)
[Service] => Array
(
[Code] => 308
[Description] => String
)
[HandlingUnitOne] => Array
(
[Quantity] => 16
[Type] => Array
(
[Code] => PLT
[Description] => String
)
)
[Commodity] => Array
(
[CommodityID] => 22
[Description] => BUGS
[Weight] => Array
(
[UnitOfMeasurement] => Array
(
[Code] => LBS
[Description] => String
)
[Value] => 511.25
)
[Dimensions] => Array
(
[UnitOfMeasurement] => Array
(
[Code] => IN
[Description] => String
)
[Length] => 1.25
[Width] => 1.2
[Height] => 5
)
[NumberOfPieces] => 1
[PackagingType] => Array
(
[Code] => PLT
[Description] => String
)
[CommodityValue] => Array
(
[CurrencyCode] => USD
[MonetaryValue] => 265.2
)
[FreightClass] => 60
[NMFCCommodityCode] => 566
)
[Reference] => Array
(
[Number] => Array
(
[Code] => PM
[Value] => 1651651616
)
[BarCodeIndicator] => Array
(
[NumberOfCartons] => 5
[Weight] => Array
(
[UnitOfMeasurement] => Array
(
[Code] => LBS
[Description] => String
)
[Value] => 2
)
)
)
)
)
)
)
)
)
[faultstring] => An exception has been raised as a result of client data.
[faultcode] => Client
[faultcodens] => http://schemas.xmlsoap.org/soap/envelope/
[detail] => stdClass Object
(
[Errors] => stdClass Object
(
[ErrorDetail] => stdClass Object
(
[Severity] => Hard
[PrimaryErrorCode] => stdClass Object
(
[Code] => 9121000
[Description] => Invalid Ship Request Document
)
)
)
)
)
I want to integrate the UPS API into my own website. I want to print the shipping label. How to fix this problem?
you should set the request xsd file,find it in other folder in the package you download.then set the request file with it.

Categories