此问题已困扰很久,烦请微信相关人员解答下,多谢。 PS:公众号故障的排除办法:https://w.url.cn/s/A1dMqXI,但报警群一般都没有通知,我测试了百来次,但通知只有三次[图片]
微信公众号授权第三方后,无法正常转发客服消息,怎么解决?1、服务器回复给微信服务器的消息解密前:<xml><Encrypt><![CDATA[Y+ZfHGPJDjsBZ8FSZxQsQb7tfp1/OzgZoM5J20iqeebd6gr/q5l6TMAnlP+QTrodN3VFnkiYKdjskqwhsjFkWkjX676xndwfBITsmS1vT4iaYSGtWvNZIlnVoiM1hUmP4EW3svzDOD1ftAGEewKYA3jUGltK3NW55CtrGlP+Aws0hsAORuWrJRZKhSXqikWKOcqhwz09nwvBKUQvngEhFtaaKOzoE42TffFE2iT1i9SfAt4aeSIDKg1s84E6FWA7mB8RRrvbVpsfVMrxgF+aJvi7HD1M6E2LiboLWNg8o5mAebjnaghzhJMwPxXyQahsB9A/vlhl4pLpTE88RBiFi2XxzbnkXQX/DcE0EeSBfDrwZ1U6V6g5wHi9w6K8Jk+8]]></Encrypt><MsgSignature><![CDATA[8420f74ef068d311f5deb18b0c6d04b1bc276459]]></MsgSignature><TimeStamp>1584862927</TimeStamp><Nonce><![CDATA[612352152]]></Nonce></xml> 2、服务器回复给微信服务器的消息解密后:<xml><ToUserName><![CDATA[oE_R9uMSB1wIIGGLUcIFwQuVceCk]]></ToUserName><FromUserName><![CDATA[gh_1e9245ac38c1]]></FromUserName><CreateTime>1584862927</CreateTime><MsgType><![CDATA[transfer_customer_service]]></MsgType></xml> 3、用微信公众平台接口调试工具:[图片] 4、微信显示的错误:[图片] 5、报警群显示的结果:[图片]
2020-03-22一样的问题,请问怎么解决的
微信公众号授权第三方后,无法正常转发客服消息,怎么办?这个是后台消息回调接口相应的代码: StringBuffer sb = new StringBuffer(); sb.append("<xml>"); sb.append("<CreateTime><" + createTime + "></CreateTime>"); sb.append("<FromUserName><![CDATA["+ toUserName +"]]></FromUserName>"); sb.append("<MsgType><![CDATA[transfer_customer_service]]></MsgType>"); sb.append("<ToUserName><![CDATA["+fromUserName+"]]></ToUserName>"); sb.append("</xml>"); String replyMsg = sb.toString(); try { WXBizMsgCrypt pc = new WXBizMsgCrypt(token, encodingaeskey, appid); replyMsg = pc.encryptMsg(replyMsg, createTime.toString(), "easemob"); } catch (AesException e) { e.printStackTrace(); } response.getWriter().write(replyMsg); 这个是公众号的报警日志, Appid: *** 昵称: *** 时间: 2020-02-11 13:47:47 内容: 微信服务器向公众号推送消息或事件后,得到的回应不合法 次数: 5分钟 2次 错误样例: [OpenID=ogJFp6MWmA0gJt2r9ot29zBgFt0o][Stamp=1581400067][3rdUrl=http://ewz9hw.natappfree.cc/wxMessage/receive/wx7b89df3f67574652][IP=112.74.89.58][MsgType=1][Msg=Text][decrypt fail][response_length=591][response_content=<xml> <Encrypt><![CDATA[Oxi5q4UJQTlvNVl4+Jx2l/QJ20u1ZJGNagwQmZ7mvTnIUNDjpXFd9Nt3obTCcmk478N+aOUKRFBY RdEtgtUYRSIzVKdQ8vThC8cHrw1M5+Q+HUGZIq/HqadyWsMlohFnQ5yfBJPVvgnM9LEL6h5wQr4h oXfCYaP0A90c/KdcXqopVEaK1LeN02ln3B/TA5cKy+ZrgrNizbKWJ25vgAmAhpVDpPXuw55IC+H0 CLjdiF2l3z9ll7H0S9CMB+xbWKeiuMk83dMxdveC4A68/u9ZGH8aSy7/iPHUPzg6AbQ+r/xCu1kx odVMAnX0ajo9q7OuUrQUBiHAYKeHVqcoF+qLzTjpJKra9uvSedxwO6a2WiAvn1VL3W454ctA4pzF e+Y1 ]]></Encrypt> <MsgSignature><![CDATA[012e69bc7abd55642809113a5a862528b3eef1d9]]></MsgSignature> <TimeStamp>1581400066</TimeStamp> <Nonce><![CDATA[easemob]]></Nonce> </xml>][第三方平台:***] 报警排查指引,请见: https://w.url.cn/s/A1dMqXI 日志提示decrypt fail,解码失败,请问怎么知道哪里出错了?
2020-03-22