Пример #1
0
 public function createXml()
 {
     $xml = parent::createXml();
     $msgType = $this->getHeaderField('MSG_TYPE');
     $xml->{$msgType}->donor = $this->getBodyField('DONOR');
     return $xml;
 }
Пример #2
0
 /**
  * method to create xml from the request
  * 
  * @return SimpleXml xml object
  */
 public function createXml()
 {
     $xml = parent::createXml();
     $msgType = $this->getHeaderField('MSG_TYPE');
     $xml->{$msgType}->portingDateTime = Application_Model_General::getDateTimeIso($this->getBodyField('PORT_TIME'));
     return $xml;
 }
Пример #3
0
 public function createXml()
 {
     $xml = parent::createXml();
     $msgType = $this->getHeaderField('MSG_TYPE');
     $xml->{$msgType} = "";
     return $xml;
 }
Пример #4
0
 public function createXml()
 {
     $xml = parent::createXml();
     $msgType = $this->getHeaderField('MSG_TYPE');
     $this->addApprovalXml($xml, $msgType);
     $this->addTrxNoXml($xml, $msgType);
     return $xml;
 }
Пример #5
0
 public function createXml()
 {
     $xml = parent::createXml();
     $msgType = $this->getHeaderField('MSG_TYPE');
     $networkType = Application_Model_General::getSettings("NetworkType");
     $numberType = $this->getBodyField('NUMBER_TYPE');
     $requestId = $this->getHeaderField('REQUEST_ID');
     $requestRecord = Application_Model_General::getFieldFromRequests(array('flags', 'transfer_time'), $requestId, 'request_id');
     $flags = json_decode($requestRecord['flags'], true);
     if (empty($numberType)) {
         $numberType = isset($flags['number_type']) ? $flags['number_type'] : Application_Model_General::getSettings("NumberType");
     }
     $number = $this->getBodyField('NUMBER');
     $portTime = Application_Model_General::getDateTimeIso($requestRecord['transfer_time']);
     $process_type = $this->getHeaderField('PROCESS_TYPE');
     if ($process_type == "PORT") {
         $path =& $xml->{$msgType}->updateRequestType;
         $path->updateType = "REQUEST";
         $path->portingDateTime = $portTime;
     } else {
         if ($process_type == "CANCEL") {
             $path =& $xml->{$msgType}->updateCancelTypeType;
             $path->updateType = "CANCEL";
             $path->portingDateTime = $portTime;
         } else {
             if ($process_type == "UPDATE") {
                 $path =& $xml->{$msgType}->updateUpdateTypeType;
                 $path->updateType = "UPDATE";
                 $path->portingDateTime = $portTime;
             }
         }
     }
     if ($networkType === "M") {
         $networkType = "mobile";
     } else {
         $networkType = "fixed";
     }
     $path->{$networkType};
     $path->{$networkType}->networkType = "M";
     if ($numberType === "I") {
         $path->{$networkType}->mobileNumberIdentified;
         $path->{$networkType}->mobileNumberIdentified->numberType = $numberType;
         $path->{$networkType}->mobileNumberIdentified->identificationValue = isset($flags['identification_value']) ? $flags['identification_value'] : 'default';
         $path->{$networkType}->mobileNumberIdentified->identificationValue2nd = 'default';
         $path->{$networkType}->mobileNumberIdentified->identificationValue3rd = 'default';
         $path->{$networkType}->mobileNumberIdentified->number = $number;
     } else {
         $path->{$networkType}->mobileNumberUnidentified;
         $path->{$networkType}->mobileNumberUnidentified->numberType = $numberType;
         $path->{$networkType}->mobileNumberUnidentified->number = $number;
     }
     return $xml;
 }
Пример #6
0
 /**
  * method to create xml from the request
  * 
  * @return SimpleXml xml object
  */
 public function createXml()
 {
     $xml = parent::createXml();
     $msgType = $this->getHeaderField('MSG_TYPE');
     $numberType = $this->getBodyField('NUMBER_TYPE');
     $xml->{$msgType}->number = $this->getBodyField('NUMBER');
     if (Application_Model_General::getSettings("NetworkType") === "M") {
         $xml->{$msgType}->mobile;
         $xml->{$msgType}->mobile->networkType = "M";
         $xml->{$msgType}->mobile->numberType = $numberType;
     } else {
         $xml->{$msgType}->fixed->networkType = "M";
         $xml->{$msgType}->fixed->numberType = $numberType;
     }
     return $xml;
 }
Пример #7
0
 public function createXml()
 {
     $xml = parent::createXml();
     $msgType = $this->getHeaderField('MSG_TYPE');
     $networkType = Application_Model_General::getSettings("NetworkType");
     $xml->{$msgType}->donor = $this->getBodyField('DONOR');
     $xml->{$msgType}->connectDateTime = Application_Model_General::getDateTimeIso($this->getBodyField('CONNECT_TIME'));
     $xml->{$msgType}->publishType = $this->getBodyField('PUBLISH_TYPE');
     $xml->{$msgType}->disconnectDateTime = Application_Model_General::getDateTimeIso($this->getBodyField('DISCONNECT_TIME'));
     if ($networkType === "M") {
         $xml->{$msgType}->mobile;
         $xml->{$msgType}->mobile->numberType = "I";
         $xml->{$msgType}->mobile->number = $this->getBodyField("NUMBER");
     } else {
         $xml->{$msgType}->fixed->fixedNumberSingle;
     }
     return $xml;
 }
Пример #8
0
 /**
  * method to create xml from the request
  * 
  * @return SimpleXml xml object
  */
 public function createXml()
 {
     $xml = parent::createXml();
     $networkType = Application_Model_General::getSettings("NetworkType");
     $numberType = $this->getBodyField('NUMBER_TYPE');
     $msgType = $this->getHeaderField('MSG_TYPE');
     $number = $this->getBodyField('NUMBER');
     if ($networkType === "M") {
         $networkType = "mobile";
     } else {
         $networkType = "fixed";
     }
     $xml->{$msgType}->{$networkType};
     $xml->{$msgType}->{$networkType}->networkType = "M";
     if ($numberType === "I") {
         $xml->{$msgType}->{$networkType}->mobileNumberIdentified->numberType = $numberType;
         $xml->{$msgType}->{$networkType}->mobileNumberIdentified->identificationValue = $this->getBodyField('IDENTIFICATION_VALUE');
         $xml->{$msgType}->{$networkType}->mobileNumberIdentified->identificationValue2nd = '';
         $xml->{$msgType}->{$networkType}->mobileNumberIdentified->identificationValue3rd = '';
         $xml->{$msgType}->{$networkType}->mobileNumberIdentified->number = $number;
     } else {
         $xml->{$msgType}->{$networkType}->mobileNumberUnidentified->numberType = $numberType;
         $xml->{$msgType}->{$networkType}->mobileNumberUnidentified->number = $number;
     }
     return $xml;
 }