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

trial webhook

parent da8aceac
......@@ -56,35 +56,34 @@ class AdminController extends \Application\Master\GlobalActionController
$id = $getpath[3];
// $curl = curl_init();
$curl = curl_init();
// 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'),
// ));
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;
$response = curl_exec($curl);
// $data = json_decode(file_get_contents('php://input'),true);
curl_close($curl);
echo $response;
// echo $data;
// print_r($data);
$data = $this->getRequest()->getPost('');
print_r($data);
$this->headScript->appendScript(' var baseURL = "' . $baseurl . '"');
$this->headScript->appendScript(' var id = "' . $id . '"');
$this->headScript->appendFile('/action-js/antrian-js/action-admin.js');
$this->layout("layout/layoutAdmin");
$this->layout("slayout/layoutAdmin");
return $view;
}
public function registrasidokterAction()
......
......@@ -54,6 +54,26 @@ class UmumController extends \Application\Master\GlobalActionController
$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 . '"');
......
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