10 use Magento\Sales\Api\Data\OrderInterfaceFactory;
24 private $orderItemRepository;
38 $this->orderItemRepository = $orderItemRepository;
39 $this->context = $context;
49 if (!$this->isItemPartOfContextOrder(
$orderItem)) {
50 return [
__(
'The creditmemo contains product item that is not part of the original order.')];
53 return [
__(
'The creditmemo contains product item that is not part of the original order.')];
57 return [
__(
'The quantity to refund must not be greater than the unrefunded quantity.')];
__construct(OrderItemRepositoryInterface $orderItemRepository, $context=null)