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

payment下prepare方法bug #260

Closed
krissss opened this issue Jan 18, 2016 · 9 comments
Closed

payment下prepare方法bug #260

krissss opened this issue Jan 18, 2016 · 9 comments

Comments

@krissss
Copy link

krissss commented Jan 18, 2016

先是调用了XML::build($params),然后作为参数传给了http_build_query()方法

@overtrue
Copy link
Collaborator

@krissss 下次直接PR嘛

@overtrue
Copy link
Collaborator

@krissss 你说的是2.1吧?

@krissss
Copy link
Author

krissss commented Jan 19, 2016

不是2.1,就是3.0的

@overtrue
Copy link
Collaborator

@krissss

  1. prepare(): https://github.com/overtrue/wechat/blob/master/src/Payment/API.php#L95
  2. request(): https://github.com/overtrue/wechat/blob/master/src/Payment/API.php#L358

prepare() 没有传 $method, 所以在 request() 中使用 post 默认值去调用Http::post()

没有发现哪里有 http_build_query 的调用啊

@krissss
Copy link
Author

krissss commented Jan 19, 2016

[2016-01-19 05:52:29] easywechat.DEBUG: Current configuration: {"debug":true,"app_id":"wx7dff301d2222e26d","secret":"xxx","token":"weixin","log":{"level":"debug","file":"common/runtime/easywechat.log"},"payment":{"merchant_id":"1304464111","key":"wx7dff301d31d5e12d","cert_path":"","key_path":""}} []
[2016-01-19 05:52:29] easywechat.DEBUG: Client Request: {"url":"https://api.mch.weixin.qq.com/pay/unifiedorder","method":"POST","options":{"form_params":"20160119055229100201601190552292016011906022913044640011453182749"}} []
[2016-01-19 05:52:29] easywechat.ERROR: 2: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in C:\soft\WWW\yua\vendor\guzzlehttp\guzzle\src\Client.php on line 294. [] []
[2016-01-19 05:52:29] easywechat.ERROR: 0: http_build_query(): Parameter 1 expected to be Array or Object. Incorrect value given in C:\soft\WWW\yua\vendor\guzzlehttp\guzzle\src\Client.php on line 294. [] []

@krissss
Copy link
Author

krissss commented Jan 19, 2016

上面是错误日志,貌似错误发生在guzzle的Http请求,实在不晓得为什么了 - -

@overtrue
Copy link
Collaborator

@krissss 感觉你的代码不是最新的

@krissss
Copy link
Author

krissss commented Jan 19, 2016

还真是这样 我错了

@krissss krissss closed this as completed Jan 19, 2016
@overtrue
Copy link
Collaborator

@krissss 没事,开发版每天都在更新,遇到问题先更新看看 😄

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