src/Frontend/Modules/Commerce/CheckoutStep/PayOrderStep.php
/**
     * Before going to the payment provider.
     *
     * @throws RedirectException
     */
Before going to the payment provider.
Before going to the payment provider .
private function prePayment(): void
    {
        $order = $this->createOrder();
        $paymentMethod = $this->getPaymentMethodHandler($this->cart->getPaymentMethod());
        $paymentMethod->setOrder($order);
        $paymentMethod->setData($this->getPaymentMethodDataTransferObject());
        $paymentMethod->setRedirectUrl($this->getUrl() . '?redirect=postPayment');
        $paymentMethod->prePayment();
    }
private function prePayment ( ) : void { $ order = $ this -> createOrder ( ) ; $ paymentMethod = $ this -> getPaymentMethodHandler ( $ this -> cart -> getPaymentMethod ( ) ) ; $ paymentMethod -> setOrder ( $ order ) ; $ paymentMethod -> setData ( $ this -> getPaymentMethodDataTransferObject ( ) ) ; $ paymentMethod -> setRedirectUrl ( $ this -> getUrl ( ) . '?redirect=postPayment' ) ; $ paymentMethod -> prePayment ( ) ; }
Before going to the payment provider.
Before going to the payment provider .
// Start the payment