davidtsadler / ebay-sdk-php

An eBay SDK for PHP. Use the eBay API in your PHP projects.
Apache License 2.0
350 stars 343 forks source link

Input data for tag <Item.ShippingDetails> is invalid or missing #124

Closed marcospampi closed 7 years ago

marcospampi commented 7 years ago

Hello and thanks, I'm stuck on addPriceFixedItem. I followed the example and adapted with my country Italy. I get this error: Error: Input data is invalid. Input data for tag <Item.ShippingDetails> is invalid or missing. Please check API documentation. That's the code for the shipment: $item->ShippingDetails = new Types\ShippingDetailsType(); $item->ShippingDetails->ShippingType = Enums\ShippingTypeCodeType::C_FLAT;

$shippingService = new Types\ShippingServiceOptionsType(); $shippingService->ShippingServicePriority = 1; $shippingService->ShippingService = "GLS"; $shippingService->ShippingServiceCost = new Types\AmountType(['value' => 2.00]); $shippingService->ShippingServiceAdditionalCost = new Types\AmountType(['value' => 1.00]); $item->ShippingDetails->ShippingServiceOptions[] = $shippingService;

I tried diving on geteBayDetails, I found the GLS ShippingService as I expected, some tips?

marcospampi commented 7 years ago

Made it work, I called ShippingServiceDetails correctly. Thanks a lot anyway, nice SDK!