微信小程序 > 微信公开课 > 客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效
微信小程序,微信公开课,客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效

客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效

2019-03-15 18:14:06

微信公开课小程序热门讨论关于「客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效」的小程序开发问题
补充:客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效
展开:publicfunctionreceivewechat($appid){if(ob_get_level()==0)ob_start();ob_implicit_flush(true);ob_clean();header(Contenttype:textxmlcharset=utf8);log_msg(headers_list());$request=Request::instance();$signature=$requestparam(signature);$msg_sign=$requestparam(msg_signature);时间戳$timestamp=$requestparam(timestamp);随机数$nonce=$requestparam(nonce);$encrypt_type=$requestparam(encrypt_type);$pc=newWXBizMsgCrypt(config(authorizertoken),config(authorizerencodingAesKey),config(authorizercomponent_appid));$encryptMsg=file_get_contents(php:input);$errCode=$pcdecryptMsg($signature,$timestamp,$nonce,$encryptMsg,$msg);if($errCode==0){$authorization_code=Db::name(authorization_code)where(authorizer_id,$applet[id])find();$de_xml_tree=newDOMDocument();$de_xml_treeloadXML($msg);$array_m=$de_xml_treegetElementsByTagName(MsgType);if(isset($array_mitem(0)nodeValue)){$event_m=$array_mitem(0)nodeValue;switch($event_m){caseevent:$array_i=$de_xml_treegetElementsByTagName(Event);$event=$array_iitem(0)nodeValue;switch($event){caseuser_enter_tempsession:error_log(user_enter_tempsession ,3,tmpxgtf_ltt);echosuccess;$FromUserName_i=$de_xml_treegetElementsByTagName(FromUserName);$str={touser:$FromUserName_iitem(0)nodeValue,msgtype:text,text:{content:欢迎光临}};$access_token=get_authorizer_access_token($appid);$ch=curl_init();curl_setopt($ch,CURLOPT_URL,https:apiweixinqqcomcgibinmessagecustomsend?access_token={$access_token});curl_setopt($ch,CURLOPT_CUSTOMREQUEST,POST);curl_setopt($ch,CURLOPT_SSL_VERIFYPEER,FALSE);curl_setopt($ch,CURLOPT_SSL_VERIFYHOST,FALSE);curl_setopt($ch,CURLOPT_USERAGENT,Mozilla50(compatible;MSIE501;WindowsNT50));curl_setopt($ch,CURLOPT_FOLLOWLOCATION,1);curl_setopt($ch,CURLOPT_AUTOREFERER,1);curl_setopt($ch,CURLOPT_POSTFIELDS,$str);curl_setopt($ch,CURLOPT_RETURNTRANSFER,true);$tmpInfo=curl_exec($ch);break;}break;casetext:$FromUserName_i=$de_xml_treegetElementsByTagName(FromUserName);$ToUserName_i=$de_xml_treegetElementsByTagName(ToUserName);$textTpl=<xml<ToUserName<![CDATA[%s]]<ToUserName<FromUserName<![CDATA[%s]]<FromUserName<CreateTime%s<CreateTime<MsgType<![CDATA[transfer_customer_service]]<MsgType<xml;$textTpl=sprintf($textTpl,$FromUserName_iitem(0)nodeValue,$ToUserName_iitem(0)nodeValue,time());$encryptMsg_now=;$return_errCode=$pcencryptMsg($textTpl,$timestamp,$nonce,$encryptMsg_now);         return$encryptMsg_now;}}}else{trace($errCode );error_log($errCode ,3,tmpxgtf_error);}}欢迎光临自动回复已成功,但是发送的消息无法转发到网页客服系统工具中,请问为什么即速小程序:没看到代码中有配置客服转接https:developersweixinqqcomminiprogramdevframeworkopenabilitycustomermessagetranshtml
更多有关「客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效」的讨论可以前往微信公开课小程序参与互动哦!
标签:微信公开课,小程序
微信小程序,微信公开课,客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效

「客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效」热门讨论订阅

方法1:微信扫描微信公开课小程序码即可订阅热门讨论「客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效」

方法2:微信搜索微信公开课小程序名称进入,即可订阅热门讨论「客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效」

方法3:微信网页访问即速商店,长按识别微信公开课小程序码即可订阅热门讨论「客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效」

微信公开课小程序热门讨论「客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效」由微信公开课原创摘录于微信小程序商店shop.jisuapp.cn,转载请注明出处。

微信公开课热门讨论「客服消息权限集已授权第三方,小程序客户消息转网页客服工具无效」由微信公开课开发者向微信用户提供,并对本服务内容、数据资料及其运营行为等真实性、合法性及有效性承担全部责任。