*/ /** * Klasa stPrzelewy24Components * * @package stPrzelewy24Plugin * @subpackage actions */ class stPrzelewy24FrontendComponents extends sfComponents { /** * Pokazywanie formularza płatności */ public function executeShowPayment() { $request = $this->getRequest(); if ($this->order) { $this->api = new stPrzelewy24(); try { $url = $this->api->getPaymentUrl($this->order); stPayment::log("przelewy24", "Generate payment url for order with id {$this->order->getId()}: $url"); } catch (Exception $e) { stPayment::log("przelewy24", "Generate payment url exception for order with id {$this->order->getId()}: {$e->getMessage()}"); } if ($url) { $this->getContext()->getController()->redirect($url); throw new sfStopException(); } } $this->smarty = new stSmarty('stPrzelewy24Frontend'); $webpage = WebpagePeer::retrieveByState('CONTACT'); if ($webpage) { sfLoader::loadHelpers(array('Helper', 'stUrl')); $this->smarty->assign('contact_url', st_url_for('stWebpageFrontend/index?url='.$webpage->getFriendlyUrl())); } } }