修改接收回调

mobile-first
cyc 6 years ago
parent d2497d51e3
commit 73a554defa

@ -119,11 +119,11 @@ class index extends CI_Controller {
//创建回调 //创建回调
public function callback(){ public function callback(){
/*$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;
//ca4f05c2ab663cd2a65f2c50366bf8a9 //ca4f05c2ab663cd2a65f2c50366bf8a9
$callback_url = 'https://oapi.dingtalk.com/call_back/register_call_back?access_token=ca4f05c2ab663cd2a65f2c50366bf8a9'; $callback_url = 'https://oapi.dingtalk.com/call_back/register_call_back?access_token='.$access_token;
$post_data = array(); $post_data = array();
$post_data['call_back_tag'] = ['bpms_task_change','bpms_instance_change']; $post_data['call_back_tag'] = ['bpms_task_change','bpms_instance_change'];
$post_data['token'] = '123456'; $post_data['token'] = '123456';
@ -134,9 +134,15 @@ class index extends CI_Controller {
print_r($register); print_r($register);
} }
public function recivecallback(){ public function recivecallback(){
echo 'success'; $recivejson = file_get_contents('php://input');
$recivejson = file_get_contents('php://input'); $encrypt = json_decode($recivejson)->encrypt;
log_message('error','dingding回调'.$recivejson); echo '{
"msg_signature":"",
"timeStamp":"'.time().'",
"nonce":"123456",
"encrypt":"'.$encrypt.'"
}';
log_message('error','dingding回调'.$recivejson);
} }
} }
Loading…
Cancel
Save