Normalize getumum payload ids
This commit is contained in:
@@ -3114,13 +3114,31 @@ class Resultentry extends MY_Controller
|
||||
return $rtn;
|
||||
}
|
||||
|
||||
function getumum()
|
||||
{
|
||||
$prm = $this->sys_input;
|
||||
|
||||
if (!$this->isLogin) {
|
||||
$this->sys_error("Invalid Token");
|
||||
exit;
|
||||
function getumum()
|
||||
{
|
||||
$prm = $this->sys_input;
|
||||
$detail0 = isset($prm['details'][0]) && is_array($prm['details'][0]) ? $prm['details'][0] : [];
|
||||
$orderid = isset($prm['orderid']) ? intval($prm['orderid']) : 0;
|
||||
if ($orderid <= 0 && isset($prm['trx_id'])) {
|
||||
$orderid = intval($prm['trx_id']);
|
||||
}
|
||||
if ($orderid <= 0 && isset($prm['T_OrderHeaderID'])) {
|
||||
$orderid = intval($prm['T_OrderHeaderID']);
|
||||
}
|
||||
if ($orderid <= 0 && isset($detail0['orderid'])) {
|
||||
$orderid = intval($detail0['orderid']);
|
||||
}
|
||||
if ($orderid <= 0 && isset($detail0['T_OrderHeaderID'])) {
|
||||
$orderid = intval($detail0['T_OrderHeaderID']);
|
||||
}
|
||||
$prm['orderid'] = $orderid;
|
||||
if ((!isset($prm['template_name']) || trim((string)$prm['template_name']) === '') && isset($detail0['template_name'])) {
|
||||
$prm['template_name'] = $detail0['template_name'];
|
||||
}
|
||||
|
||||
if (!$this->isLogin) {
|
||||
$this->sys_error("Invalid Token");
|
||||
exit;
|
||||
}
|
||||
$userid = $this->sys_user["M_UserID"];
|
||||
$rst = array();
|
||||
|
||||
Reference in New Issue
Block a user