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

根据文档写的回调 进行验签处理报错了,不知道是否是写的不对 #605

Closed
hetengji opened this issue Apr 20, 2022 · 3 comments

Comments

@hetengji
Copy link

包版本号

"yansongda/hyperf-pay": "^1.1",

问题描述

微信回调失败报错了 服务商模式支付

你的代码

image

报错详情

[ERROR] Provider response Error[287] in /www/pay/vendor/yansongda/pay/src/Functions.php
[ERROR] #0 /www/pay/vendor/yansongda/pay/src/Plugin/Wechat/CallbackPlugin.php(40): decrypt_wechat_resource()
#1 /www/pay/vendor/yansongda/supports/src/Pipeline.php(126): Yansongda\Pay\Plugin\Wechat\CallbackPlugin->assembly()
#2 /www/pay/vendor/yansongda/supports/src/Pipeline.php(84): Yansongda\Supports\Pipeline->Yansongda\Supports{closure}()
#3 /www/pay/vendor/yansongda/pay/src/Provider/AbstractProvider.php(70): Yansongda\Supports\Pipeline->then()
#4 /www/pay/vendor/yansongda/pay/src/Provider/Wechat.php(128): Yansongda\Pay\Provider\AbstractProvider->pay()
#5 /www/pay/runtime/container/proxy/App_Notify_NotifyController.proxy.php(50): Yansongda\Pay\Provider\Wechat->callback()
#6 /www/pay/vendor/hyperf/http-server/src/CoreMiddleware.php(161): App\Notify\NotifyController->wxNotify()
#7 /www/pay/vendor/hyperf/http-server/src/CoreMiddleware.php(113): Hyperf\HttpServer\CoreMiddleware->handleFound()
#8 /www/pay/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(64): Hyperf\HttpServer\CoreMiddleware->process()
#9 /www/pay/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(26): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest()
#10 /www/pay/runtime/container/proxy/Mine_Middlewares_CheckModuleMiddleware.proxy.php(63): Hyperf\Dispatcher\HttpRequestHandler->handle()
#11 /www/pay/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(64): Mine\Middlewares\CheckModuleMiddleware->process()
#12 /www/pay/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(26): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest()
#13 /www/pay/vendor/hyperf/validation/src/Middleware/ValidationMiddleware.php(83): Hyperf\Dispatcher\HttpRequestHandler->handle()
#14 /www/pay/vendor/hyperf/dispatcher/src/AbstractRequestHandler.php(64): Hyperf\Validation\Middleware\ValidationMiddleware->process()
#15 /www/pay/vendor/hyperf/dispatcher/src/HttpRequestHandler.php(26): Hyperf\Dispatcher\AbstractRequestHandler->handleRequest()
#16 /www/pay/vendor/hyperf/dispatcher/src/HttpDispatcher.php(40): Hyperf\Dispatcher\HttpRequestHandler->handle()
#17 /www/pay/vendor/hyperf/http-server/src/Server.php(117): Hyperf\Dispatcher\HttpDispatcher->dispatch()
#18 /www/pay/mine/MineServer.php(25): Hyperf\HttpServer\Server->onRequest()
#19 {main}

sdk 日志

nginx/apache 日志

涉及到 异步通知、同步通知 的问题,请贴出来
{
"id": "a3d4d716-d183-52dd-b222-744ee5ba070e",
"create_time": "2022-04-19T15:32:43+08:00",
"resource_type": "encrypt-resource",
"event_type": "TRANSACTION.SUCCESS",
"summary": "支付成功",
"resource": {
"original_type": "transaction",
"algorithm": "AEAD_AES_256_GCM",
"ciphertext": "WqMScSc889fiBIfhhBJIGhOcBDmUsojJ2YJgqN1g7aA5R3WTNfEDHN0nPp4QvFISvrH8I9v+QlE4KKtP616M2TY6AGLANnv2Cx0Q+hXholaVoFNnLXYndyFpE7/osQmtMbWOeFMmfRakYPkoML0INS3AzazGdKZim4BOI4MKmdKULUun/AI/79ptfMvZF5hoMh7NIjHlRJ+xslD4nKuVOGrLnnHQiT8n8y+2GH+q8QfwePrw6+7MhTi/D5nkBJGKfDNsG1wKTbIYlprw+IV9Lu5R7ASYaZYMVkI/KQN+xPUQl2pLgOT5Fz23gtId+ZsNTXVxbCBKAd0ETA/aPqF5JBC8umGAotNn1WGF3lfYOyLLRTfPCI/cfH90TaIMZt763Q1PRe3c/i4xUQUeG60HIZ+sFWLmQqhfF4XpIqR1ngBNliifcG6thwbtLzbWI3iUtw+b1Fk/0dbGFR9HnlSOjIUYqU8RWfX4E4pqKBQZ8wbHUMGntSMxJ1SdjwvB+levUoVmd8Avz92XXyV+lOMhjaWE6Rpk7KDmW8Gq7TnRmOpHDGU25GBUgZJiRGlnBpSYwmwMmdL4qQpI4nY5cTHmKgZAdS9aqvaRI5q5ZJH2yOLRtz6c/4A/wxU8vCYD/9/eUAJN8B6FFg==",
"associated_data": "transaction",
"nonce": "hc35lA9aifW7"
}
}

@yansongda
Copy link
Owner

解密失败了,检查你的 mch_secret_key

@hetengji
Copy link
Author

image
回调写法不正确没有传入请求
建议多写一些示例文档吧 差点一度想放弃这个插件

@yansongda
Copy link
Owner

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

2 participants