Protected Member Functions | |
_toHtml () |
Definition at line 3 of file Redirect.php.
_toHtml | ( | ) | [protected] |
Override this method in descendants to produce html
Reimplemented from Mage_Core_Block_Abstract.
Definition at line 5 of file Redirect.php.
00006 { 00007 $standard = Mage::getModel('paypal/standard'); 00008 00009 $form = new Varien_Data_Form(); 00010 $form->setAction($standard->getPaypalUrl()) 00011 ->setId('paypal_standard_checkout') 00012 ->setName('paypal_standard_checkout') 00013 ->setMethod('POST') 00014 ->setUseContainer(true); 00015 foreach ($standard->getStandardCheckoutFormFields() as $field=>$value) { 00016 $form->addField($field, 'hidden', array('name'=>$field, 'value'=>$value)); 00017 } 00018 $html = '<html><body>'; 00019 $html.= $this->__('You will be redirected to Paypal in a few seconds.'); 00020 $html.= $form->toHtml(); 00021 $html.= '<script type="text/javascript">document.getElementById("paypal_standard_checkout").submit();</script>'; 00022 $html.= '</body></html>'; 00023 00024 return $html; 00025 }