/** * Generate HTML form * * @return string */ public function generateForm() { $form = new Varien_Data_Form(); $form->setAction($this->helper->getCheckoutSession()->getEmerchantPayCheckoutRedirectUrl())->setId('emerchantpay_redirect_notification')->setName('emerchantpay_redirect_notification')->setMethod('GET')->setUseContainer(true); $submitButton = new Varien_Data_Form_Element_Submit(array('value' => $this->__('Click here, if you are not redirected within 10 seconds...'))); $submitButton->setId($this->getButtonId()); $form->addElement($submitButton); return $form->toHtml(); }
/** * Customer landing page for cancelled payment * * @return void */ public function cancelAction() { $this->helper->redirectIfNotLoggedIn(); $this->helper->restoreQuote($shouldCancel = true); $this->helper->getCheckoutSession()->addSuccess($this->helper->__('Your payment session has been cancelled successfully!')); $this->_redirect('checkout/cart', array('_secure' => true)); }
/** * Customer landing page for unsuccessful payment * * @see Genesis_API_Documentation \ return_failure_url * * @return void */ public function failureAction() { $this->helper->redirectIfNotLoggedIn(); $this->helper->restoreQuote(); $this->helper->getCheckoutSession()->addError($this->helper->__('We were unable to process your payment! Please check your input or try again later.')); $this->_redirect('checkout/cart', array('_secure' => true)); }