public function isValid()
    {
        //validate directPayment values
        $checkEmpty = array($this->ipAddress, $this->acct, $this->firstName, $this->lastName);

        if(!$this->checkEmpty($checkEmpty) || is_null($this->_address)) {
            return false;
        }

        //address fields
        $address = $this->_address;

        $test = array(
            $address->getStreet(),
            $address->getCity(),
            $address->getState(),
            $address->getCountryCode(),
            $address->getZip()
        );

        if(!$this->checkEmpty($test) || is_null($this->_paymentDetails)) {
            return false;
        }

        $amt = $this->_paymentDetails->getAmt();
        if(empty($amt)) {
            return false;
        }

        //payment details payment action cannot be order
        if($this->_paymentDetails->getPaymentAction() == "Order") {
            return false;
        }

        return true;
    }
public function isValid()
    {
        //validate directPayment values
        $checkEmpty = array($this->ipAddress, $this->acct, $this->firstName, $this->lastName);

        if(!$this->checkEmpty($checkEmpty) || is_null($this->_address)) {
            return false;
        }

        //address fields
        $address = $this->_address;

        $test = array(
            $address->getStreet(),
            $address->getCity(),
            $address->getState(),
            $address->getCountryCode(),
            $address->getZip()
        );

        if(!$this->checkEmpty($test) || is_null($this->_paymentDetails)) {
            return false;
        }

        $amt = $this->_paymentDetails->getAmt();
        if(empty($amt)) {
            return false;
        }

        //payment details payment action cannot be order
        if($this->_paymentDetails->getPaymentAction() == "Order") {
            return false;
        }

        return true;
    }
public function isValid ( ) { //validate directPayment values $ checkEmpty = array ( $ this -> ipAddress , $ this -> acct , $ this -> firstName , $ this -> lastName ) ; if ( ! $ this -> checkEmpty ( $ checkEmpty ) || is_null ( $ this -> _address ) ) { return false ; } //address fields $ address = $ this -> _address ; $ test = array ( $ address -> getStreet ( ) , $ address -> getCity ( ) , $ address -> getState ( ) , $ address -> getCountryCode ( ) , $ address -> getZip ( ) ) ; if ( ! $ this -> checkEmpty ( $ test ) || is_null ( $ this -> _paymentDetails ) ) { return false ; } $ amt = $ this -> _paymentDetails -> getAmt ( ) ; if ( empty ( $ amt ) ) { return false ; } //payment details payment action cannot be order if ( $ this -> _paymentDetails -> getPaymentAction ( ) == "Order" ) { return false ; } return true ; }
Validate the minimum set of required values for doDirectPayment

@return bool
Validate the minimum set of required values for doDirectPayment