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

微信网页支付配置生成 #751

Closed
daxiong123 opened this issue Jun 20, 2017 · 11 comments
Closed

微信网页支付配置生成 #751

daxiong123 opened this issue Jun 20, 2017 · 11 comments

Comments

@daxiong123
Copy link
Contributor

我用的环境

PHP 版本:7.0.19
overtrue/wechat 版本:3.3.2

问题及现象

wx20170620-115232

微信官网文档时间戳字段名称为 timeStamp

image

代码里生成配置时使用的是 timeStamp 生成后 将 timeStamp 赋值给 timestamp 然后销毁 timeStamp 导致微信支付签名验证不正确

@overtrue
Copy link
Collaborator

请使用 configForPayment

@daxiong123
Copy link
Contributor Author

好的 文档应该是没有更新

@overtrue
Copy link
Collaborator

你用的 JSSDK 还是 WeixinJSBridge?

@daxiong123
Copy link
Contributor Author

JSSDK

@daxiong123
Copy link
Contributor Author

image

@daxiong123
Copy link
Contributor Author

timestamp 这个字段应该还是要使用 timeStamp

@overtrue
Copy link
Collaborator

@overtrue
Copy link
Collaborator

JSSDK 生成签名时用大写,配置时用小写:

image

所以看起来我的 SDK 的写法是 OK 的

@overtrue
Copy link
Collaborator

所以不用改源代码了,你检查一下其它选项可能是错了,不应该是这个大小写问题

@daxiong123
Copy link
Contributor Author

额 我把小写的改成大写的问题就解决了

@daxiong123
Copy link
Contributor Author

找到原因了 是因为用SDK之前 前端代码直接使用的timeStamp字段 所以用了这个方法会有问题

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