Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

微信小程序消息推送设置,抛出异常Failed to decode request contents #2913

Closed
xshenzhi opened this issue Mar 28, 2025 · 0 comments

Comments

@xshenzhi
Copy link

xshenzhi commented Mar 28, 2025

小程序消息推送设置,异常: [0]Failed to decode request contents.[/www/wwwroot/jw/vendor/w7corp/easywechat/src/Kernel/Message.php:62]

thinkphp8 + easywechat6
消息加密方式:安全模式;
数据格式:XML

代码:
$app = new \EasyWeChat\MiniApp\Application([
'app_id' => $miniProgram['app_id'],
'secret' => $miniProgram['secret'],
'token' => $miniProgram['server_token'],
'aes_key' => $miniProgram['encoding_aes_key'],
]);
$server = $app->getServer();
$message = $server->getDecryptedMessage();

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant