public function billAction() { //validate params if (!$this->validateParams() || $this->_getParam("pToken") == null) { $this->redirectError(); return; } $token = new vng_zingme_payment_thrift_T_Token(); $pToken = $this->_getParam("pToken"); $token->pToken = DataFormat::hex2str($pToken); $this->updateTokenCached(); $billing = new Billing($this->_getParam("appID"), $this->_getParam("data"), $token, $_SERVER['REMOTE_ADDR']); $resCode = $billing->bill(); $this->view->billNo = $this->_getParam("refID"); $this->view->title = "Ví Zing Me - Kết quả xác nhận thanh toán sản phẩm"; $this->view->billresult = $resCode->code; $this->view->refID = $resCode->refNo; //sure that this is 3th time when server finish process user's bill ScriberPayment::sendLogStep3($this->userID, $this->_getParam("appID"), $this->_getParam("refID"), $resCode->code, $resCode->refNo); if ($resCode->code != 0) { $this->render('billingfail'); } else { $this->view->success = 1; $appCache = $this->getAppCache($this->userID, $this->_getParam("appID")); if ($appCache && $appCache == '1') { $this->view->isLite = 1; } $this->render('billingresult'); } }
public static function sendLogStep3($username, $agentID, $refID, $responseCode, $refNo) { return ScriberPayment::sendLog($username, $agentID, $refID, $responseCode, $refNo, 3, $time); }