Model/OrderPaymentList.php
protected function hasPaymentWithStatus($status)
    {
        $hasStatus = false;
        $payments = $this->getArray();

        foreach ($payments as $payment) {
            if ($status == $payment->getStatus()) {
                $hasStatus = true;
                break;
            }
        }

        return $hasStatus;
    }
protected function hasPaymentWithStatus($status)
    {
        $hasStatus = false;
        $payments = $this->getArray();

        foreach ($payments as $payment) {
            if ($status == $payment->getStatus()) {
                $hasStatus = true;
                break;
            }
        }

        return $hasStatus;
    }
protected function hasPaymentWithStatus ( $ status ) { $ hasStatus = false ; $ payments = $ this -> getArray ( ) ; foreach ( $ payments as $ payment ) { if ( $ status == $ payment -> getStatus ( ) ) { $ hasStatus = true ; break ; } } return $ hasStatus ; }
Check if list has payment with defined status.

@param string $status Payment status.

@return bool
Check if list has payment with defined status .