public function generateGatewayFormResponse($order, $gateway_url, $form_data)
    {
        /** @var ParserInterface $parser */
        $parser = $this->getContainer()->get("thelia.parser");

        $parser->setTemplateDefinition(
            $parser->getTemplateHelper()->getActiveFrontTemplate()
        );

        $renderedTemplate = $parser->render(
            "order-payment-gateway.html",
            array(
                "order_id"          => $order->getId(),
                "cart_count"        => $this->getRequest()->getSession()->getSessionCart($this->getDispatcher())->getCartItems()->count(),
                "gateway_url"       => $gateway_url,
                "payment_form_data" => $form_data
            )
        );

        return Response::create($renderedTemplate);
    }
public function generateGatewayFormResponse($order, $gateway_url, $form_data)
    {
        /** @var ParserInterface $parser */
        $parser = $this->getContainer()->get("thelia.parser");

        $parser->setTemplateDefinition(
            $parser->getTemplateHelper()->getActiveFrontTemplate()
        );

        $renderedTemplate = $parser->render(
            "order-payment-gateway.html",
            array(
                "order_id"          => $order->getId(),
                "cart_count"        => $this->getRequest()->getSession()->getSessionCart($this->getDispatcher())->getCartItems()->count(),
                "gateway_url"       => $gateway_url,
                "payment_form_data" => $form_data
            )
        );

        return Response::create($renderedTemplate);
    }
public function generateGatewayFormResponse ( $ order , $ gateway_url , $ form_data ) { /** @var ParserInterface $parser */ $ parser = $ this -> getContainer ( ) -> get ( "thelia.parser" ) ; $ parser -> setTemplateDefinition ( $ parser -> getTemplateHelper ( ) -> getActiveFrontTemplate ( ) ) ; $ renderedTemplate = $ parser -> render ( "order-payment-gateway.html" , array ( "order_id" => $ order -> getId ( ) , "cart_count" => $ this -> getRequest ( ) -> getSession ( ) -> getSessionCart ( $ this -> getDispatcher ( ) ) -> getCartItems ( ) -> count ( ) , "gateway_url" => $ gateway_url , "payment_form_data" => $ form_data ) ) ; return Response :: create ( $ renderedTemplate ) ; }
Render the payment gateway template. The module should provide the gateway URL and the form fields names and values.

@param Order  $order       the order
@param string $gateway_url the payment gateway URL
@param array  $form_data   an associative array of form data, that will be rendered as hiddent fields

@return Response the HTTP response.
Render the payment gateway template . The module should provide the gateway URL and the form fields names and values .