From 83c8fe69ded7930a96efacf769e3cf6a9cd2b236 Mon Sep 17 00:00:00 2001 From: wanghongjun <1445693971@qq,com> Date: Mon, 14 Oct 2024 11:17:04 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E6=B7=B1=E5=9C=B3=E7=A8=8E?= =?UTF-8?q?=E5=8A=A1=E6=8E=A5=E5=8F=A33?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/service/webService/ChinaTaxes.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/service/webService/ChinaTaxes.php b/app/service/webService/ChinaTaxes.php index 87f6834..4e7a8ec 100644 --- a/app/service/webService/ChinaTaxes.php +++ b/app/service/webService/ChinaTaxes.php @@ -435,6 +435,12 @@ class ChinaTaxes curl_setopt($ch, CURLOPT_POSTFIELDS, $json); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json')); // 设置HTTP头 + // 跳过证书验证(不推荐在生产环境使用) + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); + + // 跳过主机名验证 + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false); + // 执行cURL会话 $response = curl_exec($ch);