From ad395fe045b0c8f0e3e005a5171e76e80de3a6e5 Mon Sep 17 00:00:00 2001 From: lyt Date: Mon, 11 Sep 2017 14:02:49 +0800 Subject: [PATCH] empty(trim()) bug --- webht/third_party/pay/controllers/iPayLinksService.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/webht/third_party/pay/controllers/iPayLinksService.php b/webht/third_party/pay/controllers/iPayLinksService.php index d3c13f53..e49bdd0a 100644 --- a/webht/third_party/pay/controllers/iPayLinksService.php +++ b/webht/third_party/pay/controllers/iPayLinksService.php @@ -549,10 +549,11 @@ class IPayLinksService extends CI_Controller echo "200"; return; } - $dealId = trim($asyns_resp->data->dealId) ? trim($asyns_resp->data->dealId) : $this->create_guid(); + $dealId = trim($asyns_resp->data->dealId) ; + $tmp_deal = $dealId ? $dealId : $this->create_guid(); bcscale(2); $this->Note_model->save_ipl( - strval($dealId) + strval($tmp_deal) ,strval($asyns_resp->data->orderId) ,strval($asyns_resp->data->currencyCode) ,strval(bcdiv(floatval($asyns_resp->data->orderAmount), 100)) @@ -566,7 +567,7 @@ class IPayLinksService extends CI_Controller ,strval($asyns_resp->data->resultMsg) ); // 查询支付结果;入库处理 - if ( ! empty(trim($asyns_resp->data->dealId))) { + if ( ! empty($dealId)) { $query = $this->query_pay_result($asyns_resp->data); } // 返回状态码200