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?
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?