Mage_Paypal_Block_Standard_Redirect Class Reference

Inheritance diagram for Mage_Paypal_Block_Standard_Redirect:

Mage_Core_Block_Abstract Varien_Object

List of all members.

Protected Member Functions

 _toHtml ()


Detailed Description

Definition at line 3 of file Redirect.php.


Member Function Documentation

_toHtml (  )  [protected]

Override this method in descendants to produce html

Returns:
string

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     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:32 2009 for Magento by  doxygen 1.5.8