接收回调

mobile-first
cyc 6 years ago
parent d0775d1676
commit fc5300cc64

@ -118,7 +118,7 @@ class index extends CI_Controller {
} }
//创建回调 //创建回调
public function callback(){ public function registercallback(){
$access_url = 'https://oapi.dingtalk.com/gettoken?appkey='.$this->AppKey.'&appsecret='.$this->AppSecret; $access_url = 'https://oapi.dingtalk.com/gettoken?appkey='.$this->AppKey.'&appsecret='.$this->AppSecret;
$access_token = GetPost_http($access_url,'',''); $access_token = GetPost_http($access_url,'','');
$access_token = json_decode($access_token)->access_token; $access_token = json_decode($access_token)->access_token;
@ -134,15 +134,13 @@ class index extends CI_Controller {
print_r($register); print_r($register);
} }
public function recivecallback(){ public function recivecallback(){
$recivejson = file_get_contents('php://input'); $recivejson = file_get_contents('php://input');
$encrypt = json_decode($recivejson)->encrypt;
echo '{
"msg_signature":"",
"timeStamp":"'.time().'",
"nonce":"123456",
"encrypt":"'.$encrypt.'"
}';
log_message('error','dingding回调'.$recivejson); log_message('error','dingding回调'.$recivejson);
log_message('error','signature'.$_GET['signature']);
log_message('error','timestamp'.$_GET['timestamp']);
log_message('error','nonce'.$_GET['nonce']);
log_message('error','get'.$_GET);
} }
} }
Loading…
Cancel
Save