|
@@ -128,6 +128,7 @@ class Api
|
|
$this->openid = $this->getParam($param, 'openid');
|
|
$this->openid = $this->getParam($param, 'openid');
|
|
$this->other = $this->getParam($param, 'other');
|
|
$this->other = $this->getParam($param, 'other');
|
|
$this->h5 = $this->getParam($param, 'h5');
|
|
$this->h5 = $this->getParam($param, 'h5');
|
|
|
|
+ $this->ip = $this->getParam($param, 'ip');
|
|
|
|
|
|
if (!$this->project_id) {
|
|
if (!$this->project_id) {
|
|
$this->project_id = false;
|
|
$this->project_id = false;
|
|
@@ -157,6 +158,10 @@ class Api
|
|
Dever::alert('没有支付金额');
|
|
Dever::alert('没有支付金额');
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ if (!$this->ip) {
|
|
|
|
+ $this->ip = Dever::ip();
|
|
|
|
+ }
|
|
|
|
+
|
|
return $this->pay();
|
|
return $this->pay();
|
|
}
|
|
}
|
|
|
|
|
|
@@ -185,6 +190,9 @@ class Api
|
|
if (isset($this->refer) && $this->refer) {
|
|
if (isset($this->refer) && $this->refer) {
|
|
$pay['refer'] = $this->refer;
|
|
$pay['refer'] = $this->refer;
|
|
}
|
|
}
|
|
|
|
+ if (isset($this->ip) && $this->ip) {
|
|
|
|
+ $pay['ip'] = $this->ip;
|
|
|
|
+ }
|
|
|
|
|
|
$this->method = new $method($pay);
|
|
$this->method = new $method($pay);
|
|
return $this;
|
|
return $this;
|