From 21b6758c042a38471450a228b305a17574fba70d Mon Sep 17 00:00:00 2001 From: yao978318542 <978318542@qq.com> Date: Thu, 27 Apr 2023 09:52:35 +0800 Subject: [PATCH] =?UTF-8?q?V3=E9=80=80=E6=AC=BE=E9=93=BE=E6=8E=A5=E5=92=8C?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E6=96=87=E6=A1=A3=E4=B8=8D=E4=B8=80=E8=87=B4?= =?UTF-8?q?=20post=E8=AF=B7=E6=B1=82=E5=A6=82=E6=9E=9C=E5=93=8D=E5=BA=94?= =?UTF-8?q?=E5=A4=B1=E8=B4=A5=E7=9A=84=E8=AF=9D=E6=B2=A1=E6=9C=89=E4=B8=8B?= =?UTF-8?q?=E9=9D=A2=E7=9A=84timestamp=E5=AD=97=E6=AE=B5=EF=BC=8C=E7=9B=B4?= =?UTF-8?q?=E6=8E=A5=E8=BF=94=E5=9B=9E=E5=BE=AE=E4=BF=A1=E7=9A=84=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E4=BF=A1=E6=81=AF=E6=96=B9=E4=BE=BF=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WePayV3/Contracts/BasicWePay.php | 3 +++ WePayV3/Refund.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/WePayV3/Contracts/BasicWePay.php b/WePayV3/Contracts/BasicWePay.php index 056ddf7..214e9cf 100644 --- a/WePayV3/Contracts/BasicWePay.php +++ b/WePayV3/Contracts/BasicWePay.php @@ -136,6 +136,9 @@ abstract class BasicWePay ], ]); if ($verify) { + if(empty($headers)){ + return json_decode($content, true); + } $headers = []; foreach (explode("\n", $header) as $line) { if (stripos($line, 'Wechatpay') !== false) { diff --git a/WePayV3/Refund.php b/WePayV3/Refund.php index bae2563..76ed4bf 100644 --- a/WePayV3/Refund.php +++ b/WePayV3/Refund.php @@ -36,7 +36,7 @@ class Refund extends BasicWePay */ public function create($data) { - return $this->doRequest('POST', '/v3/ecommerce/refunds/apply', json_encode($data, JSON_UNESCAPED_UNICODE), true); + return $this->doRequest('POST', '/v3/refund/domestic/refunds', json_encode($data, JSON_UNESCAPED_UNICODE), true); } /**