CartOrderRouteResponse example

$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, '')));

        if ($customerComment === '') {
            return;
        }

        $cart->setCustomerComment($customerComment);
    }
Home | Imprint | This part of the site doesn't use cookies.