Ignore:
Timestamp:
Nov 14, 2014 6:01:48 AM (11 years ago)
Author:
dungnv
Message:
 
File:
1 edited

Legend:

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

    r470 r499  
    1616        }
    1717       
     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       
    1827        public function testmo() {
    1928                $url = 'http://10.58.38.162/violetservice/soanbai/mo?wsdl';
     
    5968        }
    6069       
    61         public function send($msg)
     70        public function send($msg, $receiverID)
    6271        {
    6372                $url = $this->config->item('mt_service_url');
     
    6675                $operator = 'InsertMT';
    6776                $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               
    6983                $aryParams = array(
    7084                                'User' => $username,
     
    7387                                'UserID' => '841662860000',
    7488                                'RequestID' => '4',
    75                                 'ReceiverID' => '84988568786',
     89                                'ReceiverID' => $receiverID,
    7690                                'ServiceID' => '8062',
    7791                                'CommandCode' => 'SBG',
     
    93107                }
    94108       
     109                var_dump($result);
     110               
    95111                echo "<br/>";
    96112                echo "<h2>Request</h2>";
     
    104120        {
    105121                $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';;
    108123               
    109124                $username = 'sbg';
     
    162177                                'user' => $username,
    163178                                'pass' => $password,
    164                                 'MSISDN' => '1689925260',
     179                                'MSISDN' => '01662860000',
    165180                                'Charging' => '100',
    166181                                'Contents' => 'Namta-Active'
     
    180195                }
    181196               
     197                var_dump($result);
     198               
    182199                echo "<br/>";
    183200                echo "<h2>Request</h2>";
Note: See TracChangeset for help on using the changeset viewer.