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