private readonly StateMachineRegistry
$stateMachineRegistry ) { } /**
* @throws ConstraintViolationException
*/
public function createOrder(DataBag
$data, SalesChannelContext
$context): string
{ $cart =
$this->cartService->
getCart($context->
getToken(),
$context);
$this->
validateOrderData($data,
$context,
$cart->
getLineItems()->
hasLineItemWithState(State::IS_DOWNLOAD
));
$this->
validateCart($cart,
$context->
getContext());
return $this->cartService->
order($cart,
$context,
$data->
toRequestDataBag());
} /**
* @internal Should not be called from outside the core
*/
public function orderStateTransition( string
$orderId,