From 0ceeed78a54da2c458c528336ac9180ccf1705d5 Mon Sep 17 00:00:00 2001 From: "X14XA\\shengli" Date: Fri, 24 Apr 2026 12:10:34 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=80=80=E6=AC=BE?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/factory/object/trade/RefundRequest.php | 7 +++++-- src/http/ErrCodeHelper.php | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/factory/object/trade/RefundRequest.php b/src/factory/object/trade/RefundRequest.php index b2b989c..a8ea410 100644 --- a/src/factory/object/trade/RefundRequest.php +++ b/src/factory/object/trade/RefundRequest.php @@ -44,15 +44,18 @@ class RefundRequest if(empty($this->data['org_order_id'])) { throw new ParamsException('原交易订单号不能为空', 'org_order_id'); } + $params['org_order_id'] = $this->data['org_order_id']; if(!empty($params['trans_type'])) { $params['trans_type'] = $this->data['trans_type']; } if(empty($this->data['trans_amt'])) { throw new ParamsException('退款金额不能为空', 'trans_amt'); } - if(!empty($params['div_details'])) { - $params['div_details'] = json_encode($this->data['div_details'], JSON_UNESCAPED_UNICODE); + $params['trans_amt'] = $this->data['trans_amt']; + if(empty($this->data['div_details'])) { + throw new ParamsException('退款明细不能为空', 'div_details'); } + $params['div_details'] = json_encode($this->data['div_details'], JSON_UNESCAPED_UNICODE); if(!empty($this->data['remark'])) { $params['remark'] = $this->data['remark']; } diff --git a/src/http/ErrCodeHelper.php b/src/http/ErrCodeHelper.php index 87c6cb8..f7069ca 100644 --- a/src/http/ErrCodeHelper.php +++ b/src/http/ErrCodeHelper.php @@ -76,7 +76,7 @@ class ErrCodeHelper // if(isset($err[$code])) { // throw new BizException($err[$code] . ' ' . $code . ' ' . $desc, $code); // } - if($code != 'C00000') { + if(!in_array($code, ['C00000', 'C00001', 'C00002'])) { throw new BizException($desc . ' ' . $code, $code); } } From 350ed0227713ba44a9eaeb81293e98b53367baa4 Mon Sep 17 00:00:00 2001 From: "X14XA\\shengli" Date: Fri, 24 Apr 2026 12:11:14 +0800 Subject: [PATCH 2/2] 0.0.10 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 2fd6bd6..47dd500 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,6 @@ { "name": "tansilu/hfpay-lib", - "version": "0.0.9", + "version": "0.0.10", "type": "library", "require": { "php": ">=7.4",