SetPaymentOrderRouteResponse example

$order,
            $context->getContext(),
            [SalesChannelContextService::PAYMENT_METHOD_ID => $paymentMethodId]
        );

        $this->validateRequest($context$paymentMethodId);

        $this->validatePaymentState($order);

        $this->setPaymentMethod($paymentMethodId$order$context);

        return new SetPaymentOrderRouteResponse();
    }

    private function setPaymentMethod(string $paymentMethodId, OrderEntity $order, SalesChannelContext $salesChannelContext): void
    {
        $context = $salesChannelContext->getContext();

        if ($this->tryTransition($order$paymentMethodId$context)) {
            return;
        }

        $initialState = $this->initialStateIdLoader->get(OrderTransactionStates::STATE_MACHINE);

        
Home | Imprint | This part of the site doesn't use cookies.