Source/SimpleTransaction.php
public function checkResponseHash($resp = array())
    {
        $hash = 'N/A';
        if (isset($resp['ORDER_HASH'])) {
            $hash = $resp['ORDER_HASH'];
        }
        elseif (isset($resp['hash'])) {
            $hash = $resp['hash'];
        }

        array_pop($resp);
        $calculated = $this->createHashString($resp);
        $this->debugMessage[] = 'HASH ctrl: ' . $hash;
        $this->debugMessage[] = 'HASH calculated: ' . $calculated;
        if ($hash == $calculated) {
            $this->debugMessage[] = 'HASH CHECK: ' . 'Successful';
            return true;
        }
        $this->errorMessage[] = 'HASH ctrl: ' . $hash;
        $this->errorMessage[] = 'HASH calculated: ' . $calculated;
        $this->errorMessage[] = 'HASH CHECK: ' . 'Fail';
        $this->debugMessage[] = 'HASH CHECK: ' . 'Fail';
        return false;
    }
public function checkResponseHash($resp = array())
    {
        $hash = 'N/A';
        if (isset($resp['ORDER_HASH'])) {
            $hash = $resp['ORDER_HASH'];
        }
        elseif (isset($resp['hash'])) {
            $hash = $resp['hash'];
        }

        array_pop($resp);
        $calculated = $this->createHashString($resp);
        $this->debugMessage[] = 'HASH ctrl: ' . $hash;
        $this->debugMessage[] = 'HASH calculated: ' . $calculated;
        if ($hash == $calculated) {
            $this->debugMessage[] = 'HASH CHECK: ' . 'Successful';
            return true;
        }
        $this->errorMessage[] = 'HASH ctrl: ' . $hash;
        $this->errorMessage[] = 'HASH calculated: ' . $calculated;
        $this->errorMessage[] = 'HASH CHECK: ' . 'Fail';
        $this->debugMessage[] = 'HASH CHECK: ' . 'Fail';
        return false;
    }
public function checkResponseHash ( $ resp = array ( ) ) { $ hash = 'N/A' ; if ( isset ( $ resp [ 'ORDER_HASH' ] ) ) { $ hash = $ resp [ 'ORDER_HASH' ] ; } elseif ( isset ( $ resp [ 'hash' ] ) ) { $ hash = $ resp [ 'hash' ] ; } array_pop ( $ resp ) ; $ calculated = $ this -> createHashString ( $ resp ) ; $ this -> debugMessage [ ] = 'HASH ctrl: ' . $ hash ; $ this -> debugMessage [ ] = 'HASH calculated: ' . $ calculated ; if ( $ hash == $ calculated ) { $ this -> debugMessage [ ] = 'HASH CHECK: ' . 'Successful' ; return true ; } $ this -> errorMessage [ ] = 'HASH ctrl: ' . $ hash ; $ this -> errorMessage [ ] = 'HASH calculated: ' . $ calculated ; $ this -> errorMessage [ ] = 'HASH CHECK: ' . 'Fail' ; $ this -> debugMessage [ ] = 'HASH CHECK: ' . 'Fail' ; return false ; }
Validates HASH code of the response

@param array $resp Array with the response data

@return boolean
Validates HASH code of the response