public function checkHash() {
    $string = '';
    $hashFieldName = $this->requestMethod->getNotifyHashName();

    foreach ($this->notifyParams as $k => $v) {
      if ($k !== $hashFieldName) {
        $string .= $v;
      }
    }

    if ($this->notifyParams[$hashFieldName] === hash_hmac('md5', $string, $this->secret)) {
      return TRUE;
    }

    return FALSE;
  }
public function checkHash() {
    $string = '';
    $hashFieldName = $this->requestMethod->getNotifyHashName();

    foreach ($this->notifyParams as $k => $v) {
      if ($k !== $hashFieldName) {
        $string .= $v;
      }
    }

    if ($this->notifyParams[$hashFieldName] === hash_hmac('md5', $string, $this->secret)) {
      return TRUE;
    }

    return FALSE;
  }
public function checkHash ( ) { $ string = '' ; $ hashFieldName = $ this -> requestMethod -> getNotifyHashName ( ) ; foreach ( $ this -> notifyParams as $ k => $ v ) { if ( $ k !== $ hashFieldName ) { $ string .= $ v ; } } if ( $ this -> notifyParams [ $ hashFieldName ] === hash_hmac ( 'md5' , $ string , $ this -> secret ) ) { return TRUE ; } return FALSE ; }
validates the submitted hash by comparing to a self generated Hash

@return boolean true if hash test passed
validates the submitted hash by comparing to a self generated Hash