Changeset 698 for pro-violet-viettel/sourcecode/application/modules/services/controllers/recharge.php
- Timestamp:
- Jan 19, 2015 11:51:02 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/services/controllers/recharge.php
r695 r698 42 42 $errMsg = ''; 43 43 $cardValue = 0; 44 $updatedTime = date('Y-m-d H:i:s'); 45 $status = -1; 46 44 47 if ($isLocked == 0) { 45 48 $aryParams = array( … … 50 53 51 54 $aryResult = array(); 52 //$aryResult['TransactionAmount'] = 10000; 55 53 56 $chargCard = $this->services_model->cardPaidProcess($aryParams, $aryResult); 54 //$chargCard = _SBG_CARD_PAY_SUCCESS;55 57 $status = $chargCard; 58 56 59 $paidType = 2; 57 60 $amount = $aryResult['TransactionAmount']; … … 59 62 $paidTime = date('Y-m-d H:i:s'); 60 63 $user['acc_balanced'] = $user['acc_balanced'] + $amount; 61 $user['updated_time'] = date('Y-m-d H:i:s');64 $user['updated_time'] = $updatedTime; 62 65 if ($amount > 0){ 63 66 $updateData = array('acc_balanced' => $user['acc_balanced'], 'updated_time' => $user['updated_time'] ); … … 78 81 else { 79 82 $isLocked = createLockFile($lockFilePreFix, $maxReach, $timeToUnlock, $lockFilePath, FALSE); 80 $errMsg = $isLocked == 1 ? $chargErrMsg .'<br />'.$lockedMsg : $chargErrMsg; 81 $status = 0; 83 $errMsg = $isLocked == 1 ? $chargErrMsg .'<br />'.$lockedMsg : $chargErrMsg; 82 84 } 83 85 }else if ($isLocked == 1) { 84 86 $errMsg = $lockedMsg; 85 87 $result['success'] = _SBG_CARD_PAY_FAIL; 86 $status = -1;88 $status = 0; 87 89 } 88 90 89 $this->objUserModel->insertCardlog($user['cellphone'],$userID, $status, $pinCard, $cardSerial, $cardValue, $u ser['updated_time']);91 $this->objUserModel->insertCardlog($user['cellphone'],$userID, $status, $pinCard, $cardSerial, $cardValue, $updatedTime); 90 92 91 93 $result['us_id'] = $userID;
Note: See TracChangeset
for help on using the changeset viewer.