Model/OrderPaymentStatusCalculator.php
protected function getOrderPaymentStatusPayments()
    {
        $status = 'completed';
        $paymentList = $this->getOrder()->getPaymentList();

        if ($paymentList->hasPendingPayment()) {
            $status = 'pending';
        } elseif ($paymentList->hasFailedPayment()) {
            $status = 'failed';
        }

        return $status;
    }
protected function getOrderPaymentStatusPayments()
    {
        $status = 'completed';
        $paymentList = $this->getOrder()->getPaymentList();

        if ($paymentList->hasPendingPayment()) {
            $status = 'pending';
        } elseif ($paymentList->hasFailedPayment()) {
            $status = 'failed';
        }

        return $status;
    }
protected function getOrderPaymentStatusPayments ( ) { $ status = 'completed' ; $ paymentList = $ this -> getOrder ( ) -> getPaymentList ( ) ; if ( $ paymentList -> hasPendingPayment ( ) ) { $ status = 'pending' ; } elseif ( $ paymentList -> hasFailedPayment ( ) ) { $ status = 'failed' ; } return $ status ; }
Returns order payment status calculated from existing payments.

@return string|null
Returns order payment status calculated from existing payments .