public function getMessage()
    {
        if ($this->getErrorMessage()) {
            return $this->getErrorMessage() . ' (' . $this->getErrorFieldName() . ')';
        }

        if ($this->isSuccessful()) {
            return ($this->getStatus()) ? ucfirst($this->getStatus()) : 'Successful';
        }
        // default to unsuccessful message
        return 'The transaction was unsuccessful.';
    }
public function getMessage()
    {
        if ($this->getErrorMessage()) {
            return $this->getErrorMessage() . ' (' . $this->getErrorFieldName() . ')';
        }

        if ($this->isSuccessful()) {
            return ($this->getStatus()) ? ucfirst($this->getStatus()) : 'Successful';
        }
        // default to unsuccessful message
        return 'The transaction was unsuccessful.';
    }
public function getMessage ( ) { if ( $ this -> getErrorMessage ( ) ) { return $ this -> getErrorMessage ( ) . ' (' . $ this -> getErrorFieldName ( ) . ')' ; } if ( $ this -> isSuccessful ( ) ) { return ( $ this -> getStatus ( ) ) ? ucfirst ( $ this -> getStatus ( ) ) : 'Successful' ; } // default to unsuccessful message return 'The transaction was unsuccessful.' ; }
Get error message from the response
@return string|null Error message or null if successful
Get error message from the response