- Timestamp:
- Nov 14, 2014 6:01:48 AM (11 years ago)
- Location:
- pro-violet-viettel/sourcecode/application/modules/services/controllers
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
pro-violet-viettel/sourcecode/application/modules/services/controllers/sendmessage.php
r470 r499 16 16 } 17 17 18 public function index () 19 { 20 error_reporting(E_ALL); 21 $this->load->model('Services_model'); 22 //$this->Services_model->cardPaidProcess($aryParams); 23 echo $this->Services_model->processMORequest('01662860000', strtoupper('Sbg vip 1')); 24 25 } 26 18 27 public function testmo() { 19 28 $url = 'http://10.58.38.162/violetservice/soanbai/mo?wsdl'; … … 59 68 } 60 69 61 public function send($msg )70 public function send($msg, $receiverID) 62 71 { 63 72 $url = $this->config->item('mt_service_url'); … … 66 75 $operator = 'InsertMT'; 67 76 $operation = 'http://tempuri.org/InsertMT'; 68 77 78 $aryMatch = array(); 79 if (preg_match('/^(0)([0-9]{9,10})$/', $receiverID, $aryMatch) == 1) { 80 $receiverID = '84'. $aryMatch[2]; 81 } 82 69 83 $aryParams = array( 70 84 'User' => $username, … … 73 87 'UserID' => '841662860000', 74 88 'RequestID' => '4', 75 'ReceiverID' => '84988568786',89 'ReceiverID' => $receiverID, 76 90 'ServiceID' => '8062', 77 91 'CommandCode' => 'SBG', … … 93 107 } 94 108 109 var_dump($result); 110 95 111 echo "<br/>"; 96 112 echo "<h2>Request</h2>"; … … 104 120 { 105 121 $url = $this->config->item('topup_service_url'); 106 $operator = 'TopupService'; 107 $operation = 'http://soanbaigiang.smas.vn/ITopupService/TopUp'; 122 $operation = 'http://tempuri.org/ITopupService/TopUp';; 108 123 109 124 $username = 'sbg'; … … 162 177 'user' => $username, 163 178 'pass' => $password, 164 'MSISDN' => ' 1689925260',179 'MSISDN' => '01662860000', 165 180 'Charging' => '100', 166 181 'Contents' => 'Namta-Active' … … 180 195 } 181 196 197 var_dump($result); 198 182 199 echo "<br/>"; 183 200 echo "<h2>Request</h2>"; -
pro-violet-viettel/sourcecode/application/modules/services/controllers/viettel.php
r483 r499 35 35 function messageReceiver(){ 36 36 $aryArgs = func_get_args(); 37 list($username, $password, $requestID, $userID, $receiverID, $serviceID, $commandCode, $ contentType ,$info, $receiveTime) = $aryArgs;37 list($username, $password, $requestID, $userID, $receiverID, $serviceID, $commandCode, $info, $receiveTime) = $aryArgs; 38 38 39 39 $msgType = '0'; //text message … … 48 48 if ($username != $mo_username) return '0|0|Username is not corrected!'; 49 49 if ($password != $mo_password) return '0|0|Password is not corrected!'; 50 if (!$requestID) return '0|0|requestID is required!'; 51 if ((int)$requestID != 4) return '0|0|requestID is not corrected!'; 50 if (!$requestID) return '0|0|requestID is required!'; 52 51 if (!$userID) return '0|0|UserID is required!'; 53 52 if (!$serviceID) return '0|0|serviceID is required!'; 54 53 if ($serviceID != '8062') return '0|0|serviceID is not corrected!'; 55 56 $status = 0; 57 $sentNumber = $userID; 58 $username = !$receiverID ? $sentNumber : $receiverID; 59 60 $CI->load->model('frontend/user_model', 'userModel'); 61 $password = $CI->userModel->create_random_password(); 62 63 $result = $CI->userModel->register ($sentNumber, $receiverID, $serviceID, $commandCode, $info, $receiveTime, $status); 54 55 $CI->load->model('Services_model'); 56 $CI->load->model('frontend/User_model', 'objUserModel'); 57 $result = $CI->Services_model->processMORequest($userID, strtoupper($info)); 58 $CI->objUserModel->insertSmslog($receiverID, $serviceID, $commandCode, $info, $receiveTime); 64 59 65 60 $aryResult = explode ('|', $result); 66 67 61 return $aryResult[0].'|'.$msgType.'|'.$aryResult[1]; 68 62 } 69 63 70 64 $this->_server->addFunction('messageReceiver'); 65 71 66 try { 72 67 ob_start();
Note: See TracChangeset
for help on using the changeset viewer.