1

I create a payment solution to send a HttP request to the payment gateway,

In the block/redirect.phtml

protected function _toHtml()
    { ... 

        $formHTML = $form->toHtml();        
        $html = '<html><body>';
        $html.= '<form action="'.$model->getNttUrl().'" id="aaa_standard_checkout" name="aaa_standard_checkout" method="POST" >';value="'.$model->setOrder($this->getOrder())->getStandardCheckoutFormFields().'">';
        $html.= $formHTML.'</form>';
        $html.= '<script type="text/javascript">document.getElementById("aaa_standard_checkout").submit();</script>';
        $html.= '</body></html>';
        return $html;

In the controller/

$this->getResponse()
        -enter code here>setBody($this->getLayout()
        ->createBlock('aaa/aaa_redirect')
        ->setOrder($order)
        ->toHtml());

It is success to send the request to the payment gateway, and the payment gateway would only display the result on the website as the xml format But I would not have any idea how to get back the value to our website.

0 Answers0