From 1182a2dc97987de38bdfb4edae02992a6c2a17fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Mon, 21 Apr 2025 22:29:53 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9C=AA=E8=AF=BB=E5=8F=96=E5=88=B0?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=AF=81=E4=B9=A6=E6=8F=90=E7=A4=BA=E5=BC=82?= =?UTF-8?q?=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- WePayV3/Cert.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/WePayV3/Cert.php b/WePayV3/Cert.php index bd5c7f9..94b4386 100644 --- a/WePayV3/Cert.php +++ b/WePayV3/Cert.php @@ -44,6 +44,9 @@ class Cert extends BasicWePay try { $certs = []; $result = $this->doRequest('GET', '/v3/certificates'); + if (empty($result['data']) && !empty($result['message'])) { + throw new InvalidResponseException($result['message']); + } $decrypt = new DecryptAes($this->config['mch_v3_key']); foreach ($result['data'] as $vo) { $certs[$vo['serial_no']] = [