/** * Action failure status of transaction for form payment */ public function actionFailure() { // Clear all session HelperCommon::clearStore(array('details', 'extra', 'isDeliverySame')); $view = new HelperView('form/result'); $view->setData($this->_resultData()); $view->render(); }
/** * Check account in database */ protected function checkAccount() { // Check only for SERVER and DIRECT transaction if (in_array($this->integrationType, array(SAGEPAY_SERVER, SAGEPAY_DIRECT))) { $account = HelperCommon::getStore('account'); if ($account) { $sql = 'SELECT id FROM customer WHERE id = ? AND email = ? AND hashedPassword = ?'; $stm = $this->dbHelper->execute($sql, array($account['id'], $account['email'], $account['password'])); $row = $stm->fetch(PDO::FETCH_ASSOC); if (empty($row) || empty($row['id'])) { HelperCommon::clearStore('account'); $this->redirect($this->integrationType); } } } }
/** * Action failure for direct payment */ public function actionFailure() { // Clear all session HelperCommon::clearStore(array('isDeliverySame', 'details', 'extra', 'VendorTxCode')); $view = new HelperView('direct/result'); $view->setData($this->getPaymentResultData()); $view->render(); }
/** * Action remove all the customers DIRECT mode */ public function actionDeleteAllCustomers() { HelperCommon::clearStore('account'); $sagepayToken = new SagepayToken($this->sagepayConfig); $cardTokens = ModelAbstract::factory('Card')->getAll(); foreach ($cardTokens as $card) { $sagepayToken->remove($card->token); } $view = new HelperView('admin/deleted'); $view->setData(array('env' => $this->sagepayConfig->getEnv(), 'vendorName' => $this->sagepayConfig->getVendorName(), 'integrationType' => $this->integrationType, 'numDeleted' => ModelAbstract::factory('Customer')->deleteAll())); $view->render(); }
/** * Action logout of system page */ public function actionLogout() { HelperCommon::clearStore('account'); // Render logout tpl $view = new HelperView('server-and-direct/logout'); $view->setData(array('env' => $this->sagepayConfig->getEnv(), 'vendorName' => $this->sagepayConfig->getVendorName(), 'integrationType' => $this->integrationType)); $view->render(); }