Initial import
This commit is contained in:
33
application/controllers/confirm-result/Or_dummy.php
Normal file
33
application/controllers/confirm-result/Or_dummy.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
class Or_dummy extends MY_Controller
|
||||
{
|
||||
function __construct()
|
||||
{
|
||||
parent::__construct();
|
||||
}
|
||||
function svc()
|
||||
{
|
||||
$data = $this->get_param();
|
||||
$param = [
|
||||
"IncomingJSONData" => json_encode($data),
|
||||
"IncomingM_BranchID" => $data["branch_id"],
|
||||
"IncomingT_OrderHeaderID" => $data["T_OrderHeaderID"],
|
||||
];
|
||||
$qry = $this->db->insert("or_dummy.incoming", $param);
|
||||
if (!$qry) {
|
||||
echo json_encode([
|
||||
"status" => "ERR",
|
||||
"message" => "Err incoming " . $this->db->error()["message"]
|
||||
]);
|
||||
exit;
|
||||
}
|
||||
echo json_encode(["status" => "OK", "message" => ""]);
|
||||
}
|
||||
function get_param()
|
||||
{
|
||||
$zdata = file_get_contents("php://input");
|
||||
$data = gzuncompress($zdata);
|
||||
|
||||
return json_decode($data, true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user