function preDispatch()
 {
     $sReturn = "http://" . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
     $sReturn = base64_encode($sReturn);
     $auth = Zend_Auth::getInstance();
     if (!$auth->hasIdentity()) {
         $registry = Zend_Registry::getInstance();
         $config = $registry->get('config');
         $loginUrl = $config->identity->config->local->login->url;
         $this->_redirect(ROOT_URL . $loginUrl . '?returnTo=' . $sReturn);
     } else {
         $this->_testMode = true;
         $this->_defaultCurrency = 'USD';
         $tblPaymentSetting = new App_Model_Db_Table_PaymentSetting();
         $usdIdrEx = $tblPaymentSetting->fetchAll($tblPaymentSetting->select()->where(" settingKey= 'USDIDR'"));
         $this->_currencyValue = $usdIdrEx[0]->settingValue;
         $this->_helper->layout->setLayout('layout-membership');
         $this->_helper->layout->setLayoutPath(array('layoutPath' => ROOT_DIR . '/app/modules/membership/views/layouts'));
         Zend_Session::start();
         $this->_user = $auth->getIdentity();
     }
 }
Beispiel #2
0
 public function editpaymentsettingAction()
 {
     $idSetting = $this->_request->getParam('id');
     $tblPaymentSetting = new App_Model_Db_Table_PaymentSetting();
     $rowset = $tblPaymentSetting->fetchAll("settingId = " . $idSetting);
     $this->view->id = $idSetting;
     $this->view->rows = $rowset;
     if ($this->_request->isPost($this->_request->getParam('save'))) {
         $id = $this->_request->getParam('id');
         $data['settingValue'] = $this->_request->getParam('value');
         $data['note'] = $this->_request->getParam('note');
         $update = $tblPaymentSetting->update($data, 'settingId = ' . $id);
         $zl = Zend_Registry::get('Zend_Locale');
         $this->_redirect(ROOT_URL . '/' . $zl->getLanguage() . '/store/paymentsetting');
     }
 }
Beispiel #3
0
 public function confirmAction()
 {
     $this->_checkAuth();
     $userId = $this->_user->kopel;
     $rowset = App_Model_Show_Order::show()->getTransactionToConfirm($userId);
     $numCount = App_Model_Show_Order::show()->getTransactionToConfirmCount($userId);
     $modelPaymentSetting = new App_Model_Db_Table_PaymentSetting();
     $bankAccount = $modelPaymentSetting->fetchAll("settingKey = 'bankAccount'");
     if ($this->_request->get('sended') == 1) {
         $this->view->sended = 'Payment Confirmation Sent';
     }
     $this->view->numCount = $numCount;
     $this->view->rowset = $rowset;
     $this->view->bankAccount = $bankAccount;
 }