$context->
getSalesChannel()->
getId() );
Profiler::
trace('checkout-order::event-listeners',
function D
) use ($event): void
{ $this->eventDispatcher->
dispatch($event);
});
$this->cartPersister->
delete($context->
getToken(),
$context);
try { Profiler::
trace('checkout-order::post-payment',
function D
) use ($orderEntity,
$data,
$context,
$preOrderPayment): void
{ $this->preparedPaymentService->
handlePostOrderPayment($orderEntity,
$data,
$context,
$preOrderPayment);
});
} catch (UnknownPaymentMethodException|PaymentException
) { throw CartException::
invalidPaymentButOrderStored($orderId);
} return new CartOrderRouteResponse($orderEntity);
} private function addCustomerComment(Cart
$cart, DataBag
$data): void
{ $customerComment =
ltrim(rtrim((string) $data->
get(OrderService::CUSTOMER_COMMENT_KEY, ''
)));