Skip to content

Commit 1182a2d

Browse files
committed
fix: 未读取到平台证书提示异常
1 parent 97825e0 commit 1182a2d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

WePayV3/Cert.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ public function download()
4444
try {
4545
$certs = [];
4646
$result = $this->doRequest('GET', '/v3/certificates');
47+
if (empty($result['data']) && !empty($result['message'])) {
48+
throw new InvalidResponseException($result['message']);
49+
}
4750
$decrypt = new DecryptAes($this->config['mch_v3_key']);
4851
foreach ($result['data'] as $vo) {
4952
$certs[$vo['serial_no']] = [

0 commit comments

Comments
 (0)