From 8b439fe8ee0af3f8bc0e1b35da0b09d1c63bf96c Mon Sep 17 00:00:00 2001 From: lyt Date: Thu, 26 Jul 2018 18:11:17 +0800 Subject: [PATCH] =?UTF-8?q?ipaylinks=20=E6=9F=A5=E8=AF=A2=E6=B5=8B?= =?UTF-8?q?=E8=AF=95=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pay/controllers/iPayLinksService.php | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/webht/third_party/pay/controllers/iPayLinksService.php b/webht/third_party/pay/controllers/iPayLinksService.php index f0738e8c..addba6cf 100644 --- a/webht/third_party/pay/controllers/iPayLinksService.php +++ b/webht/third_party/pay/controllers/iPayLinksService.php @@ -257,15 +257,28 @@ class IPayLinksService extends CI_Controller return; } - public function query_pay($day_offset = 1, $orderid=NULL) + public function query_pay($orderid=NULL) { $this->query_info_arr["queryOrderId"] = $this->create_guid(); $this->query_info_arr["orderId"] = $orderid; - // $this->query_info_arr["beginTime"] = date('YmdHis',strtotime("-$day_offset days")); - // $this->query_info_arr["endTime"] = date('YmdHis',strtotime("+$day_offset days")); $this->query_info_arr["mode"] = 1; // $this->query_info_arr["type"] = $day_offset; // 1-支付;2-退款 + $this->query_info_arr["signMsg"] = $this->generate_sign($this->query_info_arr); + $resp = $this->curl($this->queryUrl,$this->query_info_arr); + $resp_obj = simplexml_load_string($resp); + $this->output->set_content_type('application/json')->set_output(json_encode(simplexml_load_string($resp))); + return; + } + + public function query_pay_list($day_offset = 3) + { + $this->query_info_arr["queryOrderId"] = $this->create_guid(); + $this->query_info_arr["beginTime"] = date('YmdHis',strtotime("-$day_offset days")); + $this->query_info_arr["endTime"] = date('YmdHis235959'); + $this->query_info_arr["mode"] = 2; + $this->query_info_arr["type"] = 1; // 1-支付;2-退款 + $this->query_info_arr["signMsg"] = $this->generate_sign($this->query_info_arr); $resp = $this->curl($this->queryUrl,$this->query_info_arr); $resp_obj = simplexml_load_string($resp);