Changeset 603


Ignore:
Timestamp:
Nov 21, 2014 3:15:23 PM (10 years ago)
Author:
dungnv
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-violet-viettel/sourcecode/application/modules/services/models/services_model.php

    r599 r603  
    148148                                break;
    149149                        case _SBG_MO_PHONENUM_CHANGE:
    150                                
    151                                 if (!preg_match('/^([0-9]{10,11}$)$/', $aryContents[2])) {
     150                                if (!preg_match('/^(09\d{8}|01\d{9})$/', $aryContents[2])) {
    152151                                        $smsReturn = '0|So dien thoai khach hang khong hop le. Vui long kiem tra lai.';
    153152                                        break;
    154153                                }
    155                                
    156154                                $oldPhoneNumber = $this->formatPhoneNumber($aryContents[2]);
    157155                                $password = $aryContents[3];
    158156                                $smsReturn = $this->objUserModel->changeProfile($sentNumber, $oldPhoneNumber, $password);
    159                                 $arySMS = explode ('|', $smsReturn);
    160                                 //$sendMT = $this->sendMT($this->formatPhoneNumber($oldPhoneNumber, -1), $arySMS[1]);
    161157                                $sms = 'Ban da doi thanh cong so dien thoai tren SBG Online sang so dien thoai ' .$sentNumber. '. Tran trong.';
    162158                                $sendMT = $this->sendMT($this->formatPhoneNumber($oldPhoneNumber, -1), $sms);
    163                                
    164159                                break;
    165160                        case _SBG_MO_PASSWORD_RECOVERY:
     
    175170                        case _SBG_MO_PAY_TO_ACCOUNT_FOR:
    176171                                $userName = isset($aryContents[3]) ? $this->formatPhoneNumber($aryContents[3]) : $sentNumber;
     172                               
     173                                if (preg_match('/^(09\d{8}|01\d{9})$/', $userName) == -1) {
     174                                        $smsReturn = '0|So dien thoai khach hang khong hop le. Vui long kiem tra lai.';
     175                                        break;
     176                                }
     177                               
    177178                                $amount = $aryContents[2];
    178179                                $result =$this->chargeRootAccountProcess($sentNumber, $amount, $sentNumber.' paid for SBG');
     
    182183                                        if ($case == _SBG_MO_PAY_TO_ACCOUNT_FOR) {
    183184                                                $arySmsReturn = explode ('|', $smsReturn);
    184                                                 //$smsMT = $arySmsReturn[1] .' tu thue bao '. $sentNumber;
    185                                                 //$sendMT = $this->sendMT($this->formatPhoneNumber($userName, -1), $smsMT);
    186185                                                $smsMT = 'Ban da nap thanh cong ' .$amount . 'VND vao tai khoan ' .$username. ' tren SBG Online tu thue bao ' .$sentNumber. '. Tran trong.';
    187186                                                $sendMT = $this->sendMT($this->formatPhoneNumber($userName, -1), $smsMT);
Note: See TracChangeset for help on using the changeset viewer.