We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
PHP 版本:php7 overtrue/wechat 版本:3.1.10 是否使用了框架?框架名称:laravel 5.5
微信支付 创建订单时 传入MWEB类型 访问$app->payment->prepare($order)->mweb_url所产生的url会出现网络环境未能通过安全验证的提示
解决方案: 在new Order时的参数中加入键 spbill_create_ip 并将其值赋为下方代码所产生的ip地址
function getIP() { if (isset($_SERVER)) { if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) { $realip = $_SERVER["HTTP_X_FORWARDED_FOR"]; } else if (isset($_SERVER["HTTP_CLIENT_IP"])) { $realip = $_SERVER["HTTP_CLIENT_IP"]; } else { $realip = $_SERVER["REMOTE_ADDR"]; } } else { if (getenv("HTTP_X_FORWARDED_FOR")) { $realip = getenv("HTTP_X_FORWARDED_FOR"); } else if (getenv("HTTP_CLIENT_IP")) { $realip = getenv("HTTP_CLIENT_IP"); } else { $realip = getenv("REMOTE_ADDR"); } } return $realip; }
The text was updated successfully, but these errors were encountered:
负载均衡?
Sorry, something went wrong.
No branches or pull requests
我用的环境
PHP 版本:php7
overtrue/wechat 版本:3.1.10
是否使用了框架?框架名称:laravel 5.5
问题及现象
微信支付 创建订单时 传入MWEB类型 访问$app->payment->prepare($order)->mweb_url所产生的url会出现网络环境未能通过安全验证的提示
解决方案:
在new Order时的参数中加入键 spbill_create_ip 并将其值赋为下方代码所产生的ip地址
The text was updated successfully, but these errors were encountered: