feat(wechatmp): add support for message encryption

- Add support for message encryption in WeChat MP channel.
- Add `wechatmp_aes_key` configuration item to `config.json`.
This commit is contained in:
lanvent
2023-04-22 02:29:50 +08:00
parent b5df6faadf
commit 7c85c6f742
6 changed files with 62 additions and 36 deletions

View File

@@ -17,7 +17,7 @@ def verify_server(data):
signature = data.signature
timestamp = data.timestamp
nonce = data.nonce
echostr = data.echostr
echostr = data.get("echostr", None)
token = conf().get("wechatmp_token") # 请按照公众平台官网\基本配置中信息填写
check_signature(token, signature, timestamp, nonce)
return echostr