src/ShopBundle/objects/db/TShopPaymentHandler/TShopPaymentHandlerMontrada.class.php
public function GetAnswerFromServer($aData, $sMessageConsumer)
    {
        $bSuccess = false;
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $this->GetConfigParameter('url'));
        curl_setopt($ch, CURLOPT_VERBOSE, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_HEADER, 1);
        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)');
        curl_setopt($ch, CURLOPT_REFERER, $_SERVER['REQUEST_URI']);

        $aParameter = array();
        foreach ($aData as $sKey => $sVal) {
            if (!array_key_exists($sKey, $aParameter)) {
                $aParameter[$sKey] = $sVal;
            }
        }
        $sData = str_replace('&amp;', '&', TTools::GetArrayAsURL($aParameter));
        curl_setopt($ch, CURLOPT_POSTFIELDS, $sData);

        $response = curl_exec($ch);

        if (curl_errno($ch)) {
            TTools::WriteLogEntry('Call Montrada Page: '.print_r($aData, true).' - '.curl_errno($ch).' - '.curl_error($ch), 1, __FILE__, __LINE__);
            $oMsgManager = TCMSMessageManager::GetInstance();
            $oMsgManager->AddMessage($sMessageConsumer, 'ERROR-ORDER-REQUEST-PAYMENT-ERROR', array('errorMsg' => TGlobal::OutHTML(TGlobal::Translate('chameleon_system_shop.payment_montrada.error_request'))));

            return $bSuccess;
        } else {
            curl_close($ch);
        }
        $aParts = explode("\n", $response);
        foreach ($aParts as $sHeader) {
            header($sHeader);
        }

        return $bSuccess;
    }
public function GetAnswerFromServer($aData, $sMessageConsumer)
    {
        $bSuccess = false;
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $this->GetConfigParameter('url'));
        curl_setopt($ch, CURLOPT_VERBOSE, 1);
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_HEADER, 1);
        curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)');
        curl_setopt($ch, CURLOPT_REFERER, $_SERVER['REQUEST_URI']);

        $aParameter = array();
        foreach ($aData as $sKey => $sVal) {
            if (!array_key_exists($sKey, $aParameter)) {
                $aParameter[$sKey] = $sVal;
            }
        }
        $sData = str_replace('&amp;', '&', TTools::GetArrayAsURL($aParameter));
        curl_setopt($ch, CURLOPT_POSTFIELDS, $sData);

        $response = curl_exec($ch);

        if (curl_errno($ch)) {
            TTools::WriteLogEntry('Call Montrada Page: '.print_r($aData, true).' - '.curl_errno($ch).' - '.curl_error($ch), 1, __FILE__, __LINE__);
            $oMsgManager = TCMSMessageManager::GetInstance();
            $oMsgManager->AddMessage($sMessageConsumer, 'ERROR-ORDER-REQUEST-PAYMENT-ERROR', array('errorMsg' => TGlobal::OutHTML(TGlobal::Translate('chameleon_system_shop.payment_montrada.error_request'))));

            return $bSuccess;
        } else {
            curl_close($ch);
        }
        $aParts = explode("\n", $response);
        foreach ($aParts as $sHeader) {
            header($sHeader);
        }

        return $bSuccess;
    }
public function GetAnswerFromServer ( $ aData , $ sMessageConsumer ) { $ bSuccess = false ; $ ch = curl_init ( ) ; curl_setopt ( $ ch , CURLOPT_URL , $ this -> GetConfigParameter ( 'url' ) ) ; curl_setopt ( $ ch , CURLOPT_VERBOSE , 1 ) ; curl_setopt ( $ ch , CURLOPT_SSL_VERIFYPEER , true ) ; curl_setopt ( $ ch , CURLOPT_SSL_VERIFYHOST , 2 ) ; curl_setopt ( $ ch , CURLOPT_RETURNTRANSFER , true ) ; curl_setopt ( $ ch , CURLOPT_POST , 1 ) ; curl_setopt ( $ ch , CURLOPT_HEADER , 1 ) ; curl_setopt ( $ ch , CURLOPT_USERAGENT , 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0)' ) ; curl_setopt ( $ ch , CURLOPT_REFERER , $ _SERVER [ 'REQUEST_URI' ] ) ; $ aParameter = array ( ) ; foreach ( $ aData as $ sKey => $ sVal ) { if ( ! array_key_exists ( $ sKey , $ aParameter ) ) { $ aParameter [ $ sKey ] = $ sVal ; } } $ sData = str_replace ( '&amp;' , '&' , TTools :: GetArrayAsURL ( $ aParameter ) ) ; curl_setopt ( $ ch , CURLOPT_POSTFIELDS , $ sData ) ; $ response = curl_exec ( $ ch ) ; if ( curl_errno ( $ ch ) ) { TTools :: WriteLogEntry ( 'Call Montrada Page: ' . print_r ( $ aData , true ) . ' - ' . curl_errno ( $ ch ) . ' - ' . curl_error ( $ ch ) , 1 , __FILE__ , __LINE__ ) ; $ oMsgManager = TCMSMessageManager :: GetInstance ( ) ; $ oMsgManager -> AddMessage ( $ sMessageConsumer , 'ERROR-ORDER-REQUEST-PAYMENT-ERROR' , array ( 'errorMsg' => TGlobal :: OutHTML ( TGlobal :: Translate ( 'chameleon_system_shop.payment_montrada.error_request' ) ) ) ) ; return $ bSuccess ; } else { curl_close ( $ ch ) ; } $ aParts = explode ( "\n" , $ response ) ; foreach ( $ aParts as $ sHeader ) { header ( $ sHeader ) ; } return $ bSuccess ; }
Send Call per POST to montrada. Response is a moved permanently header which we pass through.

@param array $aData - the post data to be send to montrada
Send Call per POST to montrada . Response is a moved permanently header which we pass through .