Paypal REST API item_list required field missing - php

I get an error saying some of my items name are missing, but they are not. I got 2 different cases, but I can't find the explanation. Can anybody help?
Case 1
Is it because of the hyphen?
Request:
PayPalApiPayment Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[intent] => sale
[payer] => PayPalApiPayer Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[payment_method] => credit_card
[funding_instruments] => Array
(
[0] => PayPalApiFundingInstrument Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[credit_card] => PayPalApiCreditCard Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[type] => visa
[number] => 4200000000000000
[expire_month] => 05
[expire_year] => 2018
[cvv2] => 456
[first_name] => Jean-Sébastien
[last_name] => Proulx
)
)
)
)
)
)
)
[transactions] => Array
(
[0] => PayPalApiTransaction Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[amount] => PayPalApiAmount Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[currency] => CAD
[total] => 47.55
[details] => PayPalApiDetails Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[shipping] => 0
[tax] => 1.64
[subtotal] => 45.91
)
)
)
)
[item_list] => PayPalApiItemList Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[items] => Array
(
[0] => PayPalApiItem Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[name] => Homme (12 ans et plus) 300m/10km/2,5km
[currency] => CAD
[quantity] => 1
[price] => 35.00
)
)
[1] => PayPalApiItem Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[name] => Frais TQ Découverte, Dépasse-toi et U11 et moins
[currency] => CAD
[quantity] => 1
[price] => 2.00
)
)
[2] => PayPalApiItem Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[name] => Frais TQ non membre Découverte, Dépasse-toi et U11 et moins
[currency] => CAD
[quantity] => 1
[price] => 5.00
)
)
[3] => PayPalApiItem Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[name] => Frais de service MS1
[currency] => CAD
[quantity] => 1
[price] => 3.91
)
)
)
)
)
[description] => Triathlon Nitek Laser de Nicolet 2016 - 9e édition
[invoice_number] => trx_56d07478755d4
)
)
)
)
)
Response
Array
(
[code] => 400
[Message] => Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/payment.
[data] => {"name":"VALIDATION_ERROR","details":[{"field":"transactions[0].item_list.items[1].name","issue":"Required field missing"},{"field":"transactions[0].item_list.items[2].name","issue":"Required field missing"}],"message":"Invalid request - see details","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR","debug_id":"6da4a541e4d25"}
)
Case 2
Is it because the name begin by a number?
Request
PayPalApiPayment Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[intent] => sale
[payer] => PayPalApiPayer Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[payment_method] => credit_card
[funding_instruments] => Array
(
[0] => PayPalApiFundingInstrument Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[credit_card] => PayPalApiCreditCard Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[type] => visa
[number] => 4222222222222222
[expire_month] => 05
[expire_year] => 2018
[cvv2] => 123
[first_name] => Jean-Sébastien
[last_name] => Proulx
)
)
)
)
)
)
)
[transactions] => Array
(
[0] => PayPalApiTransaction Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[amount] => PayPalApiAmount Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[currency] => CAD
[total] => 92.74
[details] => PayPalApiDetails Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[shipping] => 0
[tax] => 9.22
[subtotal] => 83.52
)
)
)
)
[item_list] => PayPalApiItemList Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[items] => Array
(
[0] => PayPalApiItem Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[name] => TRAIL 11 KM
[currency] => CAD
[quantity] => 1
[price] => 55.00
)
)
[1] => PayPalApiItem Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[name] => 1 billet invité pour le souper spaghetti
[currency] => CAD
[quantity] => 1
[price] => 7.00
)
)
[2] => PayPalApiItem Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[name] => 1 Billet Invité BBQ
[currency] => CAD
[quantity] => 1
[price] => 15.00
)
)
[3] => PayPalApiItem Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[name] => T-shirt
[currency] => CAD
[quantity] => 1
[price] => 0.00
)
)
[4] => PayPalApiItem Object
(
[_propMap:PayPalCommonPayPalModel:private] => Array
(
[name] => Frais de service MS1
[currency] => CAD
[quantity] => 1
[price] => 6.52
)
)
)
)
)
[description] => Festival Ultimate Xc Kmag 2016
[invoice_number] => trx_56cf5aed4ba51
)
)
)
)
)
Response
Array
(
[code] => 400
[Message] => Got Http response code 400 when accessing https://api.sandbox.paypal.com/v1/payments/payment.
[data] => {"name":"VALIDATION_ERROR","details":[{"field":"transactions[0].item_list.items[1].name","issue":"Required field missing"},{"field":"payer.funding_instruments[0].credit_card.number","issue":"Value is invalid"},{"field":"transactions[0].item_list.items[2].name","issue":"Required field missing"}],"message":"Invalid request - see details","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#VALIDATION_ERROR","debug_id":"bf092633bbc19"}
)

Now this is embarrassing.
Typical case of French accents here. UTF-8 FTW.

Related

How to implement pagination using "Flight Offers Search" of Amadeus API

I want to implement pagination using "Flight Offers Search" of Amadeus API. There is no parameter to passing limit and offset using "Flight Offers Search" of Amadeus API.
I have bellow API URL with filter parameter to get flight list
https://api.amadeus.com/v2/shopping/flight-offers?originLocationCode=JFK&destinationLocationCode=LHR&departureDate=2021-09-02&returnDate=2021-09-05&adults=1&travelClass=ECONOMY¤cyCode=USD&max=10
And I got response from API like this
stdClass Object
(
[meta] => stdClass Object
(
[count] => 10
[links] => stdClass Object
(
[self] => https://api.amadeus.com/v2/shopping/flight-offers?originLocationCode=JFK&destinationLocationCode=LHR&departureDate=2021-09-02&returnDate=2021-09-05&adults=1&travelClass=ECONOMY¤cyCode=USD&max=10
)
)
[data] => Array
(
[0] => stdClass Object
(
[type] => flight-offer
[id] => 1
[source] => GDS
[instantTicketingRequired] =>
[nonHomogeneous] =>
[oneWay] =>
[lastTicketingDate] => 2021-08-28
[numberOfBookableSeats] => 9
[itineraries] => Array
(
[0] => stdClass Object
(
[duration] => PT6H50M
[segments] => Array
(
[0] => stdClass Object
(
[departure] => stdClass Object
(
[iataCode] => JFK
[terminal] => 4
[at] => 2021-09-02T08:15:00
)
[arrival] => stdClass Object
(
[iataCode] => LHR
[terminal] => 3
[at] => 2021-09-02T20:05:00
)
[carrierCode] => VS
[number] => 26
[aircraft] => stdClass Object
(
[code] => 789
)
[operating] => stdClass Object
(
[carrierCode] => VS
)
[duration] => PT6H50M
[id] => 3
[numberOfStops] => 0
[blacklistedInEU] =>
)
)
)
[1] => stdClass Object
(
[duration] => PT8H15M
[segments] => Array
(
[0] => stdClass Object
(
[departure] => stdClass Object
(
[iataCode] => LHR
[terminal] => 3
[at] => 2021-09-05T10:10:00
)
[arrival] => stdClass Object
(
[iataCode] => JFK
[terminal] => 4
[at] => 2021-09-05T13:25:00
)
[carrierCode] => VS
[number] => 4007
[aircraft] => stdClass Object
(
[code] => 764
)
[operating] => stdClass Object
(
[carrierCode] => DL
)
[duration] => PT8H15M
[id] => 8
[numberOfStops] => 0
[blacklistedInEU] =>
)
)
)
)
[price] => stdClass Object
(
[currency] => USD
[total] => 709.86
[base] => 122.00
[fees] => Array
(
[0] => stdClass Object
(
[amount] => 0.00
[type] => SUPPLIER
)
[1] => stdClass Object
(
[amount] => 0.00
[type] => TICKETING
)
)
[grandTotal] => 709.86
)
[pricingOptions] => stdClass Object
(
[fareType] => Array
(
[0] => PUBLISHED
)
[includedCheckedBagsOnly] =>
)
[validatingAirlineCodes] => Array
(
[0] => VS
)
[travelerPricings] => Array
(
[0] => stdClass Object
(
[travelerId] => 1
[fareOption] => STANDARD
[travelerType] => ADULT
[price] => stdClass Object
(
[currency] => USD
[total] => 709.86
[base] => 122.00
)
[fareDetailsBySegment] => Array
(
[0] => stdClass Object
(
[segmentId] => 3
[cabin] => ECONOMY
[fareBasis] => NH3X36B1
[brandedFare] => LIGHT
[class] => T
[includedCheckedBags] => stdClass Object
(
[quantity] => 0
)
)
[1] => stdClass Object
(
[segmentId] => 8
[cabin] => ECONOMY
[fareBasis] => NH3X36B1
[brandedFare] => LIGHT
[class] => T
[includedCheckedBags] => stdClass Object
(
[quantity] => 0
)
)
)
)
)
)
)
[dictionaries] => stdClass Object
(
[locations] => stdClass Object
(
[LHR] => stdClass Object
(
[cityCode] => LON
[countryCode] => GB
)
[JFK] => stdClass Object
(
[cityCode] => NYC
[countryCode] => US
)
)
[aircraft] => stdClass Object
(
[772] => BOEING 777-200/200ER
[764] => BOEING 767-400
[77W] => BOEING 777-300ER
[777] => BOEING 777-200/300
[789] => BOEING 787-9
)
[currencies] => stdClass Object
(
[USD] => US DOLLAR
)
[carriers] => stdClass Object
(
[AA] => AMERICAN AIRLINES
[KL] => KLM ROYAL DUTCH AIRLINES
[AF] => AIR FRANCE
[DL] => DELTA AIR LINES
[AY] => FINNAIR
[VS] => VIRGIN ATLANTIC
[BA] => BRITISH AIRWAYS
)
)
)
There is no limit and offset parameter in this API.
Please guide me how to implement pagination using "Flight Offers Search" of Amadeus API.
Thank You
The Flight Offers Search API doesn't support pagination, that's why there are not parameters available to pass the limit and offset in the API reference. Checkout the pagination guide for more information.

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.

Paypal PLUS 'Direct Debit' does not work

I have the following array for paypal plus. This works great for (iframe) 'Paypal' and 'Credit Card' payments. But does not work for 'Direct Debit'.
[_propMap:PayPal\Common\PayPalModel:private] => Array
(
[intent] => sale
[experience_profile_id] => TXP-2UP57256T6655231G
[payer] => PayPal\Api\Payer Object
(
[_propMap:PayPal\Common\PayPalModel:private] => Array
(
[payment_method] => paypal
)
)
[redirect_urls] => PayPal\Api\RedirectUrls Object
(
[_propMap:PayPal\Common\PayPalModel:private] => Array
(
[return_url] => http://test.localhost/paypal/payment.php?success=true
[cancel_url] => http://test.localhost/paypal/payment.php?success=false
)
)
[transactions] => Array
(
[0] => PayPal\Api\Transaction Object
(
[_propMap:PayPal\Common\PayPalModel:private] => Array
(
[amount] => PayPal\Api\Amount Object
(
[_propMap:PayPal\Common\PayPalModel:private] => Array
(
[total] => 10.50
[currency] => USD
[details] => PayPal\Api\Details Object
(
[_propMap:PayPal\Common\PayPalModel:private] => Array
(
[subtotal] => 7.50
[tax] => 1.50
[shipping] => 1.50
)
)
)
)
[description] => Payment description
[invoice_number] => 5936611845485
[item_list] => PayPal\Api\ItemList Object
(
[_propMap:PayPal\Common\PayPalModel:private] => Array
(
[items] => Array
(
[0] => PayPal\Api\Item Object
(
[_propMap:PayPal\Common\PayPalModel:private] => Array
(
[name] => Ground Coffee 40 oz
[description] => Ground Coffee 40 oz
[price] => 7.50
[currency] => USD
[quantity] => 1
)
)
)
)
)
[related_resources] => Array
(
)
)
)
)
[id] => PAY-9X212986B0791962DLE3GCGI
[state] => created
[create_time] => 2017-06-06T08:00:25Z
[links] => Array
(
[0] => PayPal\Api\Links Object
(
[_propMap:PayPal\Common\PayPalModel:private] => Array
(
[href] => https://api.sandbox.paypal.com/v1/payments/payment/PAY-9X212986B0791962DLE3GCGI
[rel] => self
[method] => GET
)
)
[1] => PayPal\Api\Links Object
(
[_propMap:PayPal\Common\PayPalModel:private] => Array
(
[href] => https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-41B117362N517473Y
[rel] => approval_url
[method] => REDIRECT
)
)
[2] => PayPal\Api\Links Object
(
[_propMap:PayPal\Common\PayPalModel:private] => Array
(
[href] => https://api.sandbox.paypal.com/v1/payments/payment/PAY-9X212986B0791962DLE3GCGI/execute
[rel] => execute
[method] => POST
)
)
)
)
Once i put all of my dummy bank details it says: We can not complete your purchase at the time
Please go back to the dealer and choose another payment method.
Here is the link (I am testing it in sandbox):
Can any one help?

UPS API Error: Invalid Ship Request Document

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

Categories