Open payment gateway with cUrl
===

I'm trying to access a payment gateway. In the example of the bank does with a simple html FORM but I want to do it by cURL. 
My problem is when I try to access to payment gateway does not see css (gateway stylesheets) and javascript fail. 
Is there any way to avoid these errors?

        $url = sfConfig::get('app_tpv_url');

        $dsOrder = $this->getDSOrder($order);
        $dsAmount = (float)$order->getPriceWithShipping() * 100;
        $dsCurrency = sfConfig::get('app_tpv_merchant_currency');
        $dsMerchantCode = sfConfig::get('app_tpv_merchant_code');
        $dsName = sfConfig::get('app_tpv_merchant_name');
        $dsLanguage = ($this->getUser()->getCulture() == 'es') ? 1 : 2;
        $dsTerminal = sfConfig::get('app_tpv_merchant_terminal');
        $dsSignature = sfConfig::get('app_tpv_merchant_signature');
        $dsTransactionType = 0;

        sfProjectConfiguration::getActive()->loadHelpers('Url');
        $dsUrl = url_for('cart_ipn', array('sf_culture' => $this->getUser()->getCulture(),), true);

        $dsStringResult = $dsAmount + $dsOrder + $dsMerchantCode + $dsCurrency + $dsTransactionType + $dsSignature;
        $digest = sha1($dsStringResult);

        $options = array(
            'Ds_Merchant_Amount' => $dsAmount,
            'Ds_Merchant_Currency' => $dsCurrency,
            'Ds_Merchant_Order' => $dsOrder,
            'Ds_Merchant_MerchantCode' => $dsMerchantCode,
            'Ds_Merchant_MerchantName' => $dsName,
            'Ds_Merchant_ConsumerLanguage' => $dsLanguage,
            'Ds_Merchant_Terminal' => $dsTerminal,
            'Ds_Merchant_MerchantSignature' => $digest,
            'DS_Merchant_TransactionType' => $dsTransactionType,
            'Ds_Merchant_MerchantURL' => $dsUrl
        );

        $fields_string = '';
        foreach ($options as $key => $value) {
            $fields_string .= $key . '=' . $value . '&';
        }

        $ch = curl_init();

        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $fields_string);
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_USERAGENT, $this->getContext()->getRequest()->getHttpHeader('User-Agent'));

        curl_exec($ch);

        curl_close($ch);
