private function _isValidResponse($response)
    {
        if (is_null($response)) {
            return self::ERROR_EMPTY;
        }

        if (!isset($response->result) or ($response->result != 'error')) {
            return true;
        }

        return $response->message;
    }
private function _isValidResponse($response)
    {
        if (is_null($response)) {
            return self::ERROR_EMPTY;
        }

        if (!isset($response->result) or ($response->result != 'error')) {
            return true;
        }

        return $response->message;
    }
private function _isValidResponse ( $ response ) { if ( is_null ( $ response ) ) { return self :: ERROR_EMPTY ; } if ( ! isset ( $ response -> result ) or ( $ response -> result != 'error' ) ) { return true ; } return $ response -> message ; }
Check if the request was successfull.

@param mixed $response
@return bool|int
Check if the request was successfull .