Ignore:
Timestamp:
Nov 14, 2014 11:30:00 PM (11 years ago)
Author:
namnd
Message:
 
Location:
pro-violet-viettel/sourcecode/application/modules/services
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/services/controllers/sendmessage.php

    r519 r520  
    2121                $this->load->model('Services_model');
    2222                //$this->Services_model->cardPaidProcess($aryParams);
    23                 echo $this->Services_model->processMORequest('01662860000', strtoupper('sbg DDT 0979947802 123456'));
     23                //echo $this->Services_model->processMORequest('01662860000', strtoupper('sbg DDT 0979947802 123456'));
     24                $aryParams = array(
     25                        'EWalletID' => 0,
     26                        'CardSerial' => '122346',
     27                        'PinCard' => '123456789',
     28                );
     29                echo $this->Services_model->cardPaidProcess($aryParams);
    2430        }
    2531       
     
    118124        public function topup ()
    119125        {
    120                 $usID = $this->uri->segment(4);
    121126                $url = $this->config->item('topup_service_url');
    122127               
     
    129134                $password = 'sbg56ab77cdsgb';
    130135               
    131                 $input = $this->input->post();
    132                 $cardSerial = $input['card_serial'];
    133                 $pinCard = $input['pin_card'];
    134                
    135136                $aryParams = array(
    136137                        'EWalletID' => 0,
    137                         'CardSerial' => $cardSerial,
    138                         'PinCard' => $pinCard,
    139                         'UserID' => $usID
    140                 );
    141                
    142                 $this->load->model('services_model');
    143                 echo json_encode($this->services_model->cardPaidProcess($aryParams));
    144 
     138                        'CardSerial' => '1111',
     139                        'PinCard' => '222',
     140                );
    145141                $xml = $this->load->view('topup', $aryParams, true);
    146142                $client = new nusoap_client($url);
  • pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php

    r519 r520  
    174174               
    175175                $aryTopupResult = $result['TopUpResult'];
    176                 $this->load->model('frontend/user_model', 'objUserModel');
    177                
    178                 $userID = $aryCardInfo['UserID'];
    179                 $paidType = 2;
    180                 $amount = $aryTopupResult['TransactionAmount'];
    181                 $paidTime = date('Y-m-d H:i:s');
    182                
    183                 $user = $this->objUserModel->get_user_by_id($userID);
    184                 $user['acc_balanced'] = $user['acc_balanced'] + $amount;
    185                 $user['updated_time'] = date('Y-m-d H:i:s');
    186                 if ($amount>0){
    187                         $this->objUserModel->updateUser($userID, $user);
    188                 }
    189                 $this->objUserModel->insertPaidlog($user['cellphone'], $user['cellphone'], $paidType, $amount, $paidTime);
    190176               
    191177                if ($aryTopupResult['Success'] == 'false') {
Note: See TracChangeset for help on using the changeset viewer.