Commit 0a7e6077 authored by Indra Raja's avatar Indra Raja

trial webhook

parent da8aceac
...@@ -56,35 +56,34 @@ class AdminController extends \Application\Master\GlobalActionController ...@@ -56,35 +56,34 @@ class AdminController extends \Application\Master\GlobalActionController
$id = $getpath[3]; $id = $getpath[3];
// $curl = curl_init(); $curl = curl_init();
// curl_setopt_array($curl, array( curl_setopt_array($curl, array(
// CURLOPT_URL => "http://queue.indra/api/nextantrian", CURLOPT_URL => "http://queue.indra/api/nextantrian",
// CURLOPT_RETURNTRANSFER => true, CURLOPT_RETURNTRANSFER => true,
// CURLOPT_ENCODING => "", CURLOPT_ENCODING => "",
// CURLOPT_MAXREDIRS => 10, CURLOPT_MAXREDIRS => 10,
// CURLOPT_TIMEOUT => 0, CURLOPT_TIMEOUT => 0,
// CURLOPT_FOLLOWLOCATION => true, CURLOPT_FOLLOWLOCATION => true,
// CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
// CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_CUSTOMREQUEST => "POST",
// CURLOPT_POSTFIELDS => array('inoantrian' => '7','idok' => '74','istatus' => '40'), CURLOPT_POSTFIELDS => array('inoantrian' => '7','idok' => '74','istatus' => '40'),
// )); ));
// $response = curl_exec($curl);
$response = curl_exec($curl);
// curl_close($curl);
// echo $response; curl_close($curl);
echo $response;
// $data = json_decode(file_get_contents('php://input'),true);
$data = $this->getRequest()->getPost('');
// echo $data; print_r($data);
// print_r($data);
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"'); $this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var id = "' . $id . '"'); $this->headScript->appendScript(' var id = "' . $id . '"');
$this->headScript->appendFile('/action-js/antrian-js/action-admin.js'); $this->headScript->appendFile('/action-js/antrian-js/action-admin.js');
$this->layout("layout/layoutAdmin"); $this->layout("slayout/layoutAdmin");
return $view; return $view;
} }
public function registrasidokterAction() public function registrasidokterAction()
......
...@@ -53,7 +53,27 @@ class UmumController extends \Application\Master\GlobalActionController ...@@ -53,7 +53,27 @@ class UmumController extends \Application\Master\GlobalActionController
// echo "<pre>"; // echo "<pre>";
$decodeid = base64_decode($getpath[3]); $decodeid = base64_decode($getpath[3]);
curl_setopt_array($curl, array(
CURLOPT_URL => "http://queue.indra/api/nextantrian",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array('inoantrian' => '7','idok' => '74','istatus' => '40'),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
// $data = $this->getRequest()->getRawBody();
// print_r($data);
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"'); $this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment