src/Frontend/Modules/Commerce/CheckoutStep/PayOrderStep.php
/**
     * Return from payment provider.
     *
     * @throws \Exception
     * @throws RedirectException
     */
Return from payment provider.
@throws \Exception
@throws RedirectException
Return from payment provider . @throws \ Exception @throws RedirectException
private function postPayment(): void
    {
        $paymentMethod = $this->getPaymentMethodHandler($this->cart->getPaymentMethod());
        $paymentMethod->setOrder($this->cart->getOrder());
        $paymentMethod->setData($this->getPaymentMethodDataTransferObject());
        $paymentMethod->postPayment();
        if ($paymentMethod->isExpired()) {
            $this->flashError(Language::getMessage('PaymentExpired'));
            $this->goToPreviousStep();
        }
        if ($paymentMethod->isCanceled() || $paymentMethod->isFailed()) {
            $this->flashError(Language::getMessage('PaymentCancelled'));
            $this->goToPreviousStep();
        }
        if ($paymentMethod->isOpen() || $paymentMethod->isPaid()) {
            $this->updateCartRules();
            $this->goToNextStep();
        }
    }
private function postPayment ( ) : void { $ paymentMethod = $ this -> getPaymentMethodHandler ( $ this -> cart -> getPaymentMethod ( ) ) ; $ paymentMethod -> setOrder ( $ this -> cart -> getOrder ( ) ) ; $ paymentMethod -> setData ( $ this -> getPaymentMethodDataTransferObject ( ) ) ; $ paymentMethod -> postPayment ( ) ; if ( $ paymentMethod -> isExpired ( ) ) { $ this -> flashError ( Language :: getMessage ( 'PaymentExpired' ) ) ; $ this -> goToPreviousStep ( ) ; } if ( $ paymentMethod -> isCanceled ( ) || $ paymentMethod -> isFailed ( ) ) { $ this -> flashError ( Language :: getMessage ( 'PaymentCancelled' ) ) ; $ this -> goToPreviousStep ( ) ; } if ( $ paymentMethod -> isOpen ( ) || $ paymentMethod -> isPaid ( ) ) { $ this -> updateCartRules ( ) ; $ this -> goToNextStep ( ) ; } }
Return from payment provider.
Return from payment provider .
// Start the payment