src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerOgoneBase.class.php
protected function CheckIncomingHash($aURLParameter)
    {
        $bIsValid = false;
        $oGlobal = TGlobal::instance();
        $sSharedSecret = $this->GetConfigParameter('sSharedSecretIn');
        $sIncomingHash = $oGlobal->GetUserData('SHASIGN');
        $aHashParameter = $this->GetIncomingPaymentParameter();
        $sHash = '';
        $aURLParameter = array_change_key_case($aURLParameter, CASE_UPPER);
        if ('' != $sIncomingHash) {
            foreach ($aHashParameter as $sHashParameter) {
                if (array_key_exists($sHashParameter, $aURLParameter) && '' != $aURLParameter[$sHashParameter]) {
                    $sHash .= $sHashParameter.'='.$aURLParameter[$sHashParameter].$sSharedSecret;
                }
            }
            $sHash = strtoupper(hash('sha256', $sHash));
            if ($sHash == $sIncomingHash) {
                $bIsValid = true;
            }
        } else {
            $bIsValid = true;
        }

        return $bIsValid;
    }
protected function CheckIncomingHash($aURLParameter)
    {
        $bIsValid = false;
        $oGlobal = TGlobal::instance();
        $sSharedSecret = $this->GetConfigParameter('sSharedSecretIn');
        $sIncomingHash = $oGlobal->GetUserData('SHASIGN');
        $aHashParameter = $this->GetIncomingPaymentParameter();
        $sHash = '';
        $aURLParameter = array_change_key_case($aURLParameter, CASE_UPPER);
        if ('' != $sIncomingHash) {
            foreach ($aHashParameter as $sHashParameter) {
                if (array_key_exists($sHashParameter, $aURLParameter) && '' != $aURLParameter[$sHashParameter]) {
                    $sHash .= $sHashParameter.'='.$aURLParameter[$sHashParameter].$sSharedSecret;
                }
            }
            $sHash = strtoupper(hash('sha256', $sHash));
            if ($sHash == $sIncomingHash) {
                $bIsValid = true;
            }
        } else {
            $bIsValid = true;
        }

        return $bIsValid;
    }
protected function CheckIncomingHash ( $ aURLParameter ) { $ bIsValid = false ; $ oGlobal = TGlobal :: instance ( ) ; $ sSharedSecret = $ this -> GetConfigParameter ( 'sSharedSecretIn' ) ; $ sIncomingHash = $ oGlobal -> GetUserData ( 'SHASIGN' ) ; $ aHashParameter = $ this -> GetIncomingPaymentParameter ( ) ; $ sHash = '' ; $ aURLParameter = array_change_key_case ( $ aURLParameter , CASE_UPPER ) ; if ( '' != $ sIncomingHash ) { foreach ( $ aHashParameter as $ sHashParameter ) { if ( array_key_exists ( $ sHashParameter , $ aURLParameter ) && '' != $ aURLParameter [ $ sHashParameter ] ) { $ sHash .= $ sHashParameter . '=' . $ aURLParameter [ $ sHashParameter ] . $ sSharedSecret ; } } $ sHash = strtoupper ( hash ( 'sha256' , $ sHash ) ) ; if ( $ sHash == $ sIncomingHash ) { $ bIsValid = true ; } } else { $ bIsValid = true ; } return $ bIsValid ; }
Generate hash with transfer parameter and saved shared secret and compare it with transfer hash.

HEADS UP! the OUT key in the shop config has to match the IN Key in the Ogone backend
and vice versa

@param string $aURLParameter

@return bool
Generate hash with transfer parameter and saved shared secret and compare it with transfer hash .