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

微信支付 API 调用下单解析缓缓 #977

Closed
johnshwang opened this issue Oct 23, 2017 · 0 comments
Closed

微信支付 API 调用下单解析缓缓 #977

johnshwang opened this issue Oct 23, 2017 · 0 comments

Comments

@johnshwang
Copy link

我用的环境

PHP 版本:7.1
overtrue/wechat 版本:3.3.16
是否使用了框架?框架名称:Laravel

微信支付 API 调用下单延时

在微信支付 API 调用下单的时候,该配置被timeout的配置覆盖了,导致很容易出现cURL error 28: Resolving timed out after xxxx milliseconds,的问题,微信支付 API【api.mch.weixin.qq.com】对于 IPV6支持不太完整,导致解析时间会出现大延时,需要在强制使用 ipv4,去减缓问题


EasyWeChat\Core\Http

protected static $defaults = [
    'curl' => [
        CURLOPT_IPRESOLVE => CURL_IPRESOLVE_V4,
    ],
];

EasyWeChat\Foundation\Application

Http::setDefaultOptions($this['config']->get('guzzle', ['timeout' => 5.0, '']));


overtrue added a commit that referenced this issue Oct 23, 2017
overtrue added a commit that referenced this issue Oct 23, 2017
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