正在显示
1 个修改的文件
包含
17 行增加
和
12 行删除
@@ -33,20 +33,25 @@ class LoadController extends HomeBaseController | @@ -33,20 +33,25 @@ class LoadController extends HomeBaseController | ||
33 | } | 33 | } |
34 | public function notify(){ | 34 | public function notify(){ |
35 | 35 | ||
36 | - $RequestType = $_POST['RequestType']; | ||
37 | - $RequestData = $_POST['RequestData']; | ||
38 | - if(empty($RequestType)){ | ||
39 | - $this->error('error'); | 36 | + $data = file_get_contents('php://input'); |
37 | + $msg = explode("&", $data); | ||
38 | + foreach ($msg as $k => $v) { | ||
39 | + $p = explode("=", $v); | ||
40 | + if ($p[0] == "RequestData") { | ||
41 | + $result[$p[0]] = json_decode(urldecode($p[1]),true); | ||
42 | + } else { | ||
43 | + $result[$p[0]] = urldecode($p[1]); | ||
40 | } | 44 | } |
41 | - if($RequestType != 101){ | ||
42 | - $this->error('error'); | ||
43 | } | 45 | } |
44 | - $result = json_decode($RequestData,true); | ||
45 | - cache('result',$result); | ||
46 | - $bird = config('bird'); | ||
47 | - $date = date("Y-m-d H:i:s",time()); | ||
48 | - $data = '{ "EBusinessID": "test1472267", "UpdateTime": "'.$date.'", "Success": true, "Reason": ""}'; | 46 | + /*echo '<pre>'; |
47 | + print_r($res);exit;*/ | ||
48 | + $data = '{ | ||
49 | + "EBusinessID": "'.$result['RequestData']['EBusinessID'].'", | ||
50 | + "UpdateTime": "'. date('Y-m-d H:i:s', time()) .'", | ||
51 | + "Success": "true", | ||
52 | + "Reason": "" | ||
53 | + }'; | ||
49 | cache('data',$data); | 54 | cache('data',$data); |
50 | - return $data; | 55 | + echo $data; |
51 | } | 56 | } |
52 | } | 57 | } |
-
请 注册 或 登录 后发表评论