mirror of
https://gitee.com/yansongda/pay.git
synced 2024-12-03 04:38:03 +08:00
Update TransferGateway.php
可以自己指定客户端IP,自己测试的时候不至于获取到的是局域网IP地址,提交到网关被拒
This commit is contained in:
parent
e71a5f6fc8
commit
b619e417f9
@ -34,7 +34,7 @@ class TransferGateway extends Gateway
|
||||
$payload['mch_appid'] = Support::getInstance()->getConfig($type, '');
|
||||
$payload['mchid'] = $payload['mch_id'];
|
||||
|
||||
if (php_sapi_name() !== 'cli') {
|
||||
if (php_sapi_name() !== 'cli' && (!isset($payload['spbill_create_ip']) || empty($payload['spbill_create_ip']))) {
|
||||
$payload['spbill_create_ip'] = Request::createFromGlobals()->server->get('SERVER_ADDR');
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user