-
Notifications
You must be signed in to change notification settings - Fork 67
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
设置了 passbackParams 会导致 alipaySdk.checkNotifySign 失败 #45
Comments
发现了问题所在: 此处对 value 进行了 decodeURIComponent 操作,而对于 passbackParams 官方文档又说: 临时解决办法,在 checkNotifySign 前对 passback_params 进行一次 encodeURIComponent: payload.passback_params = encodeURIComponent(payload.passback_params)
const verified = alipaySdk.checkNotifySign(payload) |
这...这个例子下你的方案可能就是最好的方案了,SDK 也知道哪个参数需要 encode 哪个不需要 encode |
@tudou527 我是觉得不应该对值进行 decodeURIComponent 操作吧,传给 checkNotifySign 的数据应该默认是正规化的。而且 POST 这么一段数据给服务器 |
遇到相同的问题。建议官方在文档里稍微加点说明。https://www.yuque.com/chenqiu/alipay-node-sdk/notify_verify |
我也遇到了这个问题,我把解码函数删掉了,传过来的既然是json,函数默认入参是object ,就没必要再解码一次了把 |
2023年11月23日,此问题还没解决,文档没有一点说明,排查此问题-5小时,so alibaba fuck u! |
如下,去除 passbackParams 后 alipaySdk.checkNotifySign 才会成功:
The text was updated successfully, but these errors were encountered: