Skip to content

Commit

Permalink
添加IP地址默认值
Browse files Browse the repository at this point in the history
  • Loading branch information
iflamed committed Apr 28, 2016
1 parent bef6920 commit 5c95734
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/WxPayApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ public function transferCash($inputObj, $timeOut = 10)
throw new WxPayException("提交被扫支付API接口中,缺少必填参数re_user_name!");
}

$inputObj->setSpbillCreateIp($_SERVER['REMOTE_ADDR']); //终端ip
$ip = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : '127.0.0.1';
$inputObj->setSpbillCreateIp($ip); //终端ip
$inputObj->setAppid($this->apiConfig->appid); //公众账号ID
$inputObj->setMchId($this->apiConfig->mchid); //商户号
$inputObj->setMchKey($this->apiConfig->mchkey); //商户密钥
Expand Down

0 comments on commit 5c95734

Please sign in to comment.