Esempio n. 1
0
 public function requestformAction()
 {
     $tokenObj = new TokenGenerator();
     try {
         $userID = $this->_getParam("userID");
         $token = $tokenObj->getToken($userID);
         $this->view->pToken = DataFormat::hexstr($token->pToken);
         $this->view->timestamp = $token->timestamp;
         $warmupObj = new Warmup();
         $warmupObj->warmup($userID);
     } catch (Exception $e) {
         print_r($e);
     }
     $this->view->formaction = "/billing/bill";
     $this->render('billingex');
 }
Esempio n. 2
0
 public function requestformAction()
 {
     try {
         //validate params
         if (!$this->validateParams()) {
             $this->redirectError();
             return;
         }
         if (!$this->tranx) {
             $this->parseTransaction();
         }
         $isUnFinish = $this->generateToken();
         if (!$isUnFinish) {
             echo "<p style='text-align:center'>Bạn đã thực hiện giao dịch này rồi - Ví Zing Me</p>";
             exit;
         }
         $warmupObj = new Warmup();
         $warmupObj->warmup($this->userID);
     } catch (Exception $e) {
         $this->redirectError();
         return;
     }
     $appCache = $this->getAppCache($this->userID, $this->view->appInfo->appID);
     if ($appCache && $appCache == '1') {
         $this->_forward('bill', null, null, array('appID' => $this->view->appInfo->appID, 'data' => $this->view->data, 'pToken' => $this->view->pToken));
         return;
     }
     $this->view->data = $this->_getParam("data");
     $this->view->title = "Ví Zing Me - Xác nhận thanh toán sản phẩm";
     $this->view->formaction = "/billing/bill";
     $this->view->userID = $this->userID;
     $this->view->tranx = $this->tranx;
     $this->render('billingex');
 }