I will intend catch value of parameters in html using ajax and on the controler(symfony) send data in json using curl. 
<script type="text/javascript">
    $(document).ready(function(){
        $("#submit").click(function(){
            $.ajax({
                url:"send",
                type:"POST",
                crossDomain: true,
                headers: {
                    'Authorization':'Basic MTQ1MjI3OjEzYTk4MGQ0Zjg1MWYzZDlhMWNmYzc5MmZiMWY1ZTUw',
                    'Content-Type':'application/json'
                },
                dataType: 'jsonp',
                data:{
                    customerIp:$("#customerIp").val(),
                    merchantPosId:$("#merchantPosId").val(),
                    description:$("#description").val(),
                    totalAmount:$("#totalAmount").val(),
                    currencyCode:$("#currencyCode").val(),
                    products1name:$("#products1name").val(),
                    products1unitePrice:$("#products1unitePrice").val(),
                    products1quantit:$("#products1quantit").val(),
                    notifyUrl:$("#notifyUrl").val(),
                    continueUrl:$("#continueUrl").val()
                },
                beforeSend:function(){
                    console.log($("#customerIp").val());
                }
            });
        });
    });
</script>
<div id="result"></div>
<form name="contact" id="contact" methode="post">
    customerIp:<input  name="customerIp" id="customerIp" value="123.123.123.123"/></br>
    merchantPosId:<input name="merchantPosId" id="merchantPosId" value="145227"/></br>
    description:<input name="description" id="description" value="Opis zamówienia"/></br>
    totalAmount:<input  name="totalAmount" id="totalAmount" value="1000"/></br>
    currencyCode:<input  name="currencyCode" id="currencyCode" value="PLN"/></br>
    products1name:<input  name="products1name" id="products1name" value="Produkt 1"/></br>
    products1unitePrice:<input  name="products1unitePrice" id="products1unitePrice" value="1000"/></br>
    products1quantit:<input  name="products1quantit" id="products1quantit" value="1"/></br>
    notifyUrl:<input  name="notifyUrl"  id="notifyUrl" value="http://shop.url/notify" /></br>
    continueUrl:<input  name="continueUrl" id="continueUrl" value="http://shop.url/continue" /></br>
    <input type="button" value="submit" name="submit" id="submit"/>
</form>
In Controller in symfony 
public function sendAction(Request $request)
    {
        print('Jestem tutaj');
        $variable = '';
        $merchantPosId='';
        if ($request->request->get('customerIp') != null) {
            $variable = $request->request->get('customerIp');
        }
        if ($request->request->has('merchantPosId')) {
            $merchantPosId = $request->request->get('merchantPosId');
        }
        if ($request->request->has('merchantPosId')) {
            $merchantPosId = $request->request->get('merchantPosId');
        }
        if ($request->request->has('description')) {
            $description = $request->request->get('description');
        }
        if ($request->request->has('totalAmount')) {
            $totalAmount = $request->request->get('totalAmount');
        }
        if ($request->request->has('currencyCode')) {
            $currencyCode = $request->request->get('currencyCode');
        }
        if ($request->request->has('products1name')) {
            $products1name = $request->request->get('products1name');
        }
        if ($request->request->has('products1unitePrice')) {
            $products1unitePrice = $request->request->get('products1unitePrice');
        }
        if ($request->request->has('products1quantit')) {
            $products1quantit = $request->request->get('products1quantit');
        }
        if ($request->request->has('notifyUrl')) {
            $notifyUrl = $request->request->get('notifyUrl');
        }
        if ($request->request->has('continueUrl')) {
            $continueUrl = $request->request->get('continueUrl');
        }
        if (isset($variable)) {
            $data = array(
                "customerIp" => $variable,
                "merchantPosId" => $merchantPosId,
                "merchantPosId" =>$merchantPosId,
            "description=" =>$description,
            "totalAmount=" =>$totalAmount,
            "currencyCode=" =>$currencyCode,
            "products"=>array(
                "name" =>$products1name,
                "unitPrice"=>$products1unitePrice,
                "quantity" =>$products1quantit
            ),
            "notifyUrl=" =>$notifyUrl,
            "continueUrl=" =>$continueUrl
            );
            $data_string = json_encode($data);
            $ch = curl_init('https://secure.payu.com/api/v2_1/orders');
            curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
            curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_HTTPHEADER, array(
                'Content-Type: application/json',
                'Authorization:Basic MTQ1MjI3OjEzYTk4MGQ0Zjg1MWYzZDlhMWNmYzc5MmZiMWY1ZTUw'
            ));
            $contents = curl_exec($ch);
            curl_close($ch);
        }
        print_r($variable);
        return $this->render('BartekPsiutekBundle:Default:send.html.twig',array('result' => $data_string));
    }