'tags',
'transactions.stateMachineState',
'stateMachineState',
]);
$this->eventDispatcher->
dispatch(new OrderPaymentMethodChangedCriteriaEvent($orderId,
$criteria,
$context));
/** @var OrderEntity|null $order */
$order =
$this->orderRepository->
search($criteria,
$context->
getContext())->
first();
if ($order === null
) { throw new EntityNotFoundException('order',
$orderId);
} return $order;
} /**
* @throws PaymentMethodNotChangeableException
*/
private function validatePaymentState(OrderEntity
$order): void
{ if ($this->orderService->
isPaymentChangeableByTransactionState($order)) {