src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerOgoneAliasGateway.class.php
protected function HandleError()
    {
        static $bErrorsHandled = false;
        if (!$bErrorsHandled) {
            $bErrorsHandled = true;
            $oMessageManager = TCMSMessageManager::GetInstance();
            $oGlobal = TGlobal::instance();
            $aErrorFields = $this->GetErrorFields();
            $aReturnedParameter = $oGlobal->GetUserData();
            $aTrackedErrors = array();
            $sConsumerName = self::MSG_MANAGER_NAME;
            foreach ($aErrorFields as $sErrorField) {
                if (array_key_exists($sErrorField, $aReturnedParameter) && $aReturnedParameter[$sErrorField] > 0) {
                    if (!in_array($aReturnedParameter[$sErrorField], $aTrackedErrors)) {
                        TTools::WriteLogEntry('OGONE Alias Gateway: error from alias gateway call: '.$sErrorField.'-'.$aReturnedParameter[$sErrorField], 1, __FILE__, __LINE__);
                        $oMessageManager->AddMessage($sConsumerName, 'PAYMENT-HANDLER-OGONE-ALIAS-GATEWAY-ERROR-'.$sErrorField.'-'.$aReturnedParameter[$sErrorField]);
                        $aTrackedErrors[] = $aReturnedParameter[$sErrorField];
                    }
                }
            }
        }
    }
protected function HandleError()
    {
        static $bErrorsHandled = false;
        if (!$bErrorsHandled) {
            $bErrorsHandled = true;
            $oMessageManager = TCMSMessageManager::GetInstance();
            $oGlobal = TGlobal::instance();
            $aErrorFields = $this->GetErrorFields();
            $aReturnedParameter = $oGlobal->GetUserData();
            $aTrackedErrors = array();
            $sConsumerName = self::MSG_MANAGER_NAME;
            foreach ($aErrorFields as $sErrorField) {
                if (array_key_exists($sErrorField, $aReturnedParameter) && $aReturnedParameter[$sErrorField] > 0) {
                    if (!in_array($aReturnedParameter[$sErrorField], $aTrackedErrors)) {
                        TTools::WriteLogEntry('OGONE Alias Gateway: error from alias gateway call: '.$sErrorField.'-'.$aReturnedParameter[$sErrorField], 1, __FILE__, __LINE__);
                        $oMessageManager->AddMessage($sConsumerName, 'PAYMENT-HANDLER-OGONE-ALIAS-GATEWAY-ERROR-'.$sErrorField.'-'.$aReturnedParameter[$sErrorField]);
                        $aTrackedErrors[] = $aReturnedParameter[$sErrorField];
                    }
                }
            }
        }
    }
protected function HandleError ( ) { static $ bErrorsHandled = false ; if ( ! $ bErrorsHandled ) { $ bErrorsHandled = true ; $ oMessageManager = TCMSMessageManager :: GetInstance ( ) ; $ oGlobal = TGlobal :: instance ( ) ; $ aErrorFields = $ this -> GetErrorFields ( ) ; $ aReturnedParameter = $ oGlobal -> GetUserData ( ) ; $ aTrackedErrors = array ( ) ; $ sConsumerName = self :: MSG_MANAGER_NAME ; foreach ( $ aErrorFields as $ sErrorField ) { if ( array_key_exists ( $ sErrorField , $ aReturnedParameter ) && $ aReturnedParameter [ $ sErrorField ] > 0 ) { if ( ! in_array ( $ aReturnedParameter [ $ sErrorField ] , $ aTrackedErrors ) ) { TTools :: WriteLogEntry ( 'OGONE Alias Gateway: error from alias gateway call: ' . $ sErrorField . '-' . $ aReturnedParameter [ $ sErrorField ] , 1 , __FILE__ , __LINE__ ) ; $ oMessageManager -> AddMessage ( $ sConsumerName , 'PAYMENT-HANDLER-OGONE-ALIAS-GATEWAY-ERROR-' . $ sErrorField . '-' . $ aReturnedParameter [ $ sErrorField ] ) ; $ aTrackedErrors [ ] = $ aReturnedParameter [ $ sErrorField ] ; } } } } }
handle error codes from the api.
handle error codes from the api .