Example #1
0
 /**
  * convert Xml data to associative array
  * 
  * @param simple_xml $xmlObject simple xml object
  * 
  * @return array converted data from hierarchical xml to flat array
  */
 public function convertArray($xmlObject)
 {
     $ret = parent::convertArray($xmlObject);
     if (isset($xmlObject->portingDateTime)) {
         $ret['PORT_TIME'] = (string) $xmlObject->portingDateTime;
     }
     return $ret;
 }
Example #2
0
 /**
  * Constructor
  * 
  * receives options array and sets into body array and parent's construct
  * accordingly sets parent's $type to "Return Response"
  * 
  * @param array $options 
  */
 protected function __construct(&$options)
 {
     parent::__construct($options);
     //SET BODY
     foreach ($options as $key => $value) {
         switch (ucwords(strtolower($key))) {
             case "Request_trx_no":
             case "Approval_ind":
             case "Reject_reason_code":
                 $this->setBodyField($key, $value);
                 break;
         }
     }
 }
Example #3
0
 /**
  * updates status , last transaction and disconnect time in requests table 
  * where request_id 
  * 
  * overridden from parent Np_Method
  * 
  * @return bool 
  */
 public function saveToDB()
 {
     if (parent::saveToDB() === FALSE) {
         return FALSE;
     }
     $updateArray = array('status' => 1, 'last_transaction' => $this->getHeaderField("MSG_TYPE"), 'disconnect_time' => Application_Model_General::getDateTimeInSqlFormat($this->getBodyField("DISCONNECT_TIME")));
     // if it's execute_response that leaves, status => 0 (no more actions)
     if ($this->getHeaderField("FROM") == Application_Model_General::getSettings('InternalProvider')) {
         $updateArray['status'] = 0;
     }
     $whereArray = array('request_id =?' => $this->getHeaderField("REQUEST_ID"));
     $tbl = new Application_Model_DbTable_Requests(Np_Db::master());
     return $tbl->update($updateArray, $whereArray);
 }
 /**
  * convert Xml data to associative array
  * 
  * @param simple_xml $xmlObject simple xml object
  * 
  * @return array converted data from hierarchical xml to flat array
  */
 public function convertArray($xmlObject)
 {
     $ret = parent::convertArray($xmlObject);
     if (isset($xmlObject->positiveApproval) && isset($xmlObject->positiveApproval->currentOperator)) {
         $ret['CURRENT_OPERATOR'] = (string) $xmlObject->positiveApproval->currentOperator;
     }
     return $ret;
 }
Example #5
0
 /**
  * convert Xml data to associative array
  * 
  * @param simple_xml $xmlObject simple xml object
  * 
  * @return array converted data from hierarchical xml to flat array
  */
 public function convertArray($xmlObject)
 {
     $ret = parent::convertArray($xmlObject);
     $ret['ESSENTIAL_INFO_1'] = (string) $xmlObject->essentialInfo1;
     $ret['ESSENTIAL_INFO_2'] = (string) $xmlObject->essentialInfo2;
     $ret['ESSENTIAL_INFO_3'] = (string) $xmlObject->essentialInfo3;
     $ret['ESSENTIAL_INFO_4'] = (string) $xmlObject->essentialInfo4;
     $ret['ESSENTIAL_INFO_5'] = (string) $xmlObject->essentialInfo5;
     return $ret;
 }