From bed2fe1093d26e48df2e0360c6690d373f9ac580 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Thu, 21 May 2020 18:17:51 +0800 Subject: [PATCH] add clear --- wchat/qq/Recharge.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/wchat/qq/Recharge.php b/wchat/qq/Recharge.php index a1b32ad..8ba5b72 100644 --- a/wchat/qq/Recharge.php +++ b/wchat/qq/Recharge.php @@ -21,8 +21,18 @@ class Recharge extends SmallProgram private $data = []; + private $spbill_create_ip = ''; + private $unifiedorder = 'https://qpay.qq.com/cgi-bin/pay/qpay_unified_order.cgi'; + /** + * @param string $value + */ + public function setSpbillCreateIp(string $value) + { + $this->spbill_create_ip = $value; + } + /** * @param int $money * @param string $orderNo @@ -76,7 +86,7 @@ class Recharge extends SmallProgram 'body' => $this->config->getBody(), 'out_trade_no' => $this->orderNo, 'total_fee' => $this->money, - 'spbill_create_ip' => $_SERVER['REMOTE_ADDR'], + 'spbill_create_ip' => $this->spbill_create_ip, 'notify_url' => $this->config->getNotifyUrl(), 'trade_type' => $this->config->getTradeType(), ];