Skip to content


Subversion checkout URL

You can clone with
Download ZIP
tree: 0a2b67de4a
Fetching contributors…

Cannot retrieve contributors at this time

50 lines (45 sloc) 1.726 kB
* Magento
* This source file is subject to the Open Software License (OSL 3.0)
* that is bundled with this package in the file LICENSE.txt.
* It is also available through the world-wide-web at this URL:
* If you did not receive a copy of the license and are unable to
* obtain it through the world-wide-web, please send an email
* to so we can send you a copy immediately.
* @category CosmoCommerce
* @package CosmoCommerce_Alipay
* @copyright Copyright (c) 2009-2013 CosmoCommerce,LLC. (
* @contact :
* T: +86-021-66346672
* L: Shanghai,China
class CosmoCommerce_Alipay_Block_Redirect extends Mage_Core_Block_Abstract
protected function _toHtml()
$standard = Mage::getModel('alipay/payment');
$form = new Varien_Data_Form();
foreach ($standard->setOrder($this->getOrder())->getStandardCheckoutFormFields() as $field => $value) {
$form->addField($field, 'hidden', array('name' => $field, 'value' => $value));
$formHTML = $form->toHtml();
$html = '<html><body>';
$html.= $this->__('You will be redirected to Alipay in a few seconds.');
$html.= $formHTML;
$html.= '<script type="text/javascript">document.getElementById("alipay_payment_checkout").submit();</script>';
$html.= '</body></html>';
return $html;
Jump to Line
Something went wrong with that request. Please try again.