protected function validatePaymentOrder()
    {
        $field = 'payment';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

        if ($this->isUpdating() && !isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        $label = $this->translation->text('Payment');

        if (empty($value)) {
            $this->setErrorRequired($field, $label);
            return false;
        }

        $method = $this->payment->get($value);

        if (empty($method['status'])) {
            $this->setErrorUnavailable($field, $label);
            return false;
        }

        return true;
    }
protected function validatePaymentOrder()
    {
        $field = 'payment';

        if ($this->isExcluded($field)) {
            return null;
        }

        $value = $this->getSubmitted($field);

        if ($this->isUpdating() && !isset($value)) {
            $this->unsetSubmitted($field);
            return null;
        }

        $label = $this->translation->text('Payment');

        if (empty($value)) {
            $this->setErrorRequired($field, $label);
            return false;
        }

        $method = $this->payment->get($value);

        if (empty($method['status'])) {
            $this->setErrorUnavailable($field, $label);
            return false;
        }

        return true;
    }
protected function validatePaymentOrder ( ) { $ field = 'payment' ; if ( $ this -> isExcluded ( $ field ) ) { return null ; } $ value = $ this -> getSubmitted ( $ field ) ; if ( $ this -> isUpdating ( ) && ! isset ( $ value ) ) { $ this -> unsetSubmitted ( $ field ) ; return null ; } $ label = $ this -> translation -> text ( 'Payment' ) ; if ( empty ( $ value ) ) { $ this -> setErrorRequired ( $ field , $ label ) ; return false ; } $ method = $ this -> payment -> get ( $ value ) ; if ( empty ( $ method [ 'status' ] ) ) { $ this -> setErrorUnavailable ( $ field , $ label ) ; return false ; } return true ; }
Validates a payment method
@return boolean|null
Validates a payment method