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

连续多次执行微信支付退款报错 #348

Closed
skyfister opened this issue Mar 18, 2016 · 10 comments
Closed

连续多次执行微信支付退款报错 #348

skyfister opened this issue Mar 18, 2016 · 10 comments

Comments

@skyfister
Copy link

我用的环境

Ubuntu14.04+Nginx+PHP5-FPM
PHP 版本:5.5.9
overtrue/wechat 版本:2.1

问题及现象

连续创建Refund对象执行退款,第一次成功,第二次就会报错:[Wechat]FAIL: 签名错误,代码有1分钟的缓存,不知道跟这个有没有关系呢

@overtrue
Copy link
Collaborator

@skyfister 对同一笔订单?多次退款?

@skyfister
Copy link
Author

不是哈,是不同订单连续退款,查看了下源代码,对签名那块儿不是很理解,同样的参数,在退款队列中排第一和排第二个生成的签名不一样,是不是跟static:params静态变量有关?也就是一次退款一个订单能成功,连续退两个订单第二个就会失败,签名确实不一样!

@overtrue
Copy link
Collaborator

@skyfister 建议你使用3.0, 2.x 的支付部分不是我写的

@skyfister
Copy link
Author

@overtrue 产品要上线了,有点来不及,支付部分是thenbsp这位仁兄写的?

@overtrue
Copy link
Collaborator

@skyfister@jaring 群里的 昵称好像是:枫林残忆

@skyfister
Copy link
Author

@overtrue 好的,谢咯

@jaring
Copy link

jaring commented Mar 21, 2016

行72 改为 protected static $params = null;
已pull requests

@skyfister
Copy link
Author

@jaring 感谢!Good Job

@overtrue
Copy link
Collaborator

@skyfister 是否解决你的问题?如果解决请close. 谢谢!

@skyfister
Copy link
Author

@overtrue 好的,再次感谢!

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

3 participants