public function index() { $post = XMLPost2Array($this->input->post()); $post['Debug'] = $this->input->post('Debug'); if (isset($post['DocID'])) { $post['HBooking'] = $post['DocID']; unset($post['DocID']); } $a_post = $this->cancel_model->getSplitHBooking($post); unset($post); $a_logs = array(); try { $isCancelled = 'False'; foreach ($a_post as $idx => &$post) { $this->cancel_model->getRequest($post); $post['response'] = httpcurl($post['request'], $this->url, $this->option); if ($this->cancel_model->checkCancel($post) === TRUE) { $isCancelled = 'True'; } $a_logs['request'][$idx] = $post['request']; $a_logs['response'][$idx] = $post['response']; } $xmlResponse = array("ResNo" => $a_post[0]['ResNo'], "Hbooking" => $a_post[0]['HBooking'], "ErrorDescription" => '', "CancelResult" => 'True'); } catch (Exception $ex) { log_message('INFO', 'ERROR MSG => ' . $ex->getMessage() . '; LINE => ' . $ex->getLine() . '; FILE => ' . $ex->getFile()); $xmlResponse = array("ResNo" => $a_post[0]['ResNo'], "Hbooking" => $a_post[0]['HBooking'], "ErrorDescription" => $ex->getMessage(), "CancelResult" => 'False'); } $this->load->view('travflex/cancel_response', array('xmlResponse' => $xmlResponse)); xmllog21s('CancelRSVN', $a_logs); }
private function bookingProduct(&$post) { //create booking request $this->load->model('travflex/book/prebook_model'); $this->prebook_model->getRequest($post); //send booking. $post['response'] = httpcurl($post['request'], $this->url, $this->option); array_push($this->log_21['request'], $post['request']); array_push($this->log_21['response'], $post['response']); }