Developers Program

Using the Ebay_Manager component for PHP to set ShippingServiceOptions

Published: June 30 2005, 5:10:00 PMยทUpdated: July 25 2022, 3:04:22 AM

Products

Question

I want to add shippingservicecost in my additem options, but i cannot get it to work with the following code using Ebay_Manager for PHP: $opts = array( 'Category' => 14111, 'Country' => 'US', 'Currency' => 1, 'Description' => 'Item Description', 'Duration' => 7, 'DetailLevel'=> 0, 'Location' => 'San Jose, CA', 'MinimumBid' => '1.00', 'PaymentSeeDescription' => 1, 'Quantity' => 1, 'Region' => 60, 'SellerPays' => 0, 'Title' => 'Item Title', 'Version' => 2, 'CheckoutDetailsSpecified'=> 1, 'MOCashiers'=> 1, 'ShippingServiceOptions.ShippingServiceOption.ShippingServicePriority'=> 1, 'ShippingServiceOptions.ShippingServiceOption.ShippingService'=> '3', 'ShippingServiceOptions.ShippingServiceOption.ShippingServiceCost'=> '14.95', ... ); I keep getting error code 10019 with the above requests.

Answer

The correct way to specify ShippingServiceOptions in your PHP code using Ebay_Manager is the following:

$opts = array(
...
"ServiceShippingOptions" => array(
"ServiceShippingOption" => array(
"ShippingServicePriority" => 1,
"ShippingService" => 3,
"ShippingServiceCost" => '14.95'
)
),
...
);

The key is that you want to set the ShippingServiceOptions as a sub-array in your code.
How well did this answer your question?