Description
When trying to run a payed order through a \Magento\Framework\Webapi\ServiceOutputProcessor it will fail because the 'additional_information' data has no corresponding setter defined in the interface.
Preconditions
- PHP7
- CE 2.2.2
Steps to reproduce
- Create a payed order
- Try to process the order with a \Magento\Framework\Webapi\ServiceOutputProcessor:
$serviceOutputProcessor->process(
$order,
'Magento\Sales\Api\OrderRepositoryInterface',
'get'
);
Expected result
- You get don't get any errors
Actual result
- Exception is thrown:
Property "AdditionalInformation" does not have corresponding setter in class "Magento\Sales\Api\Data\OrderPaymentInterface".
The ServiceOutputProcessor tries to serialize the order object based on the (api) interfaces. When it reaches the serialization of the Payment object in the order the processor will fail when the object has data for 'additional_information' (normally this contains the payment method name).
The Magento\Sales\Api\Data\OrderPaymentInterface should contain a setAdditionalInformation function definition which will be implemented by the setAdditionalInformation function defined in Magento\Payment\Model\InfoInterface