*/ /** * Klasa stPlatnosciPlFrontendComponents * * @package stPlatnosciPlPlugin * @subpackage actions */ class stPlatnosciPlFrontendComponents extends sfComponents { /** * Pokazywanie formularza płatności */ public function executeShowPayment() { $this->smarty = new stSmarty('stPlatnosciPlFrontend'); $api = new stPlatnosciPl(); $order = stPaymentType::getOrderInSummary(); try { $url = $api->getOrderFormUrl($order); if ($url) { return $this->getController()->redirect($url); } } catch (OpenPayU_Exception $e) { stPlatnosciPl::log("stPlatnosciPl::getOrderFormUrl() - Exception:\n".$e->getFile().':'.$e->getLine().':'.$e->getMessage()); } $webpage = WebpagePeer::retrieveByState('CONTACT'); if ($webpage) { sfLoader::loadHelpers(array('Helper', 'stUrl')); $this->smarty->assign('contact_url', st_url_for('stWebpageFrontend/index?url='.$webpage->getFriendlyUrl())); } } }