|
My custom module is a payment gateaway, i have a redirect controller and here is the script
class Asurepay_Custompay_AsurepayController extends Mage_Core_Controller_Front_Action { protected $_order; public function getOrder() { if ($this->_order == null) { } return $this->_order; } public function indexAction(){ echo "index test 1"; } public function redirectAction(){ $session = Mage::getSingleton('checkout/session'); $session->setAsurepayCustompayQuoteId($session->getQuoteId()); $this->getResponse()->setBody($this->getLayout()->createBlock('asurepay/redirect')->toHtml()); $session->unsQuoteId(); $session->unsRedirectUrl(); } }
The function redirectAction() can’t get the toHtml() function
and here is the error:
Fatal error: Call to a member function toHtml() on a non-object in my code
what should be the error of this? I have a block in ModuleName/Block/Redirect.php and I have a toHtml(). or what should be the cause of error?
|