From 472c7b940f515e940a8ab54ff2d24ab0b703a963 Mon Sep 17 00:00:00 2001 From: lingling <1077478963@qq.com> Date: Fri, 21 Mar 2025 20:49:51 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=BC=98=E5=8C=96=E6=94=AF=E4=BB=98API?= =?UTF-8?q?=E8=AF=B7=E6=B1=82=E9=94=99=E8=AF=AF=E6=97=A5=E5=BF=97=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=BC=BA=E9=94=99=E8=AF=AF=E4=BF=A1=E6=81=AF=E8=AE=B0?= =?UTF-8?q?=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Utils/API/PaymentNew.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/Utils/API/PaymentNew.php b/app/Utils/API/PaymentNew.php index 6a852aa..d0b0138 100644 --- a/app/Utils/API/PaymentNew.php +++ b/app/Utils/API/PaymentNew.php @@ -112,15 +112,15 @@ class PaymentNew return json_decode($responseBody); } catch (\GuzzleHttp\Exception\RequestException $e) { - Log::warning("请求支付api失未知失败:" . $e->getMessage()); + // Log::warning("请求支付api失未知失败:" . $e->getMessage()); // 如果是 400 错误,可能有额外的请求错误信息 if ($e->hasResponse()) { $response = $e->getResponse(); $httpCode = $response->getStatusCode(); - if ($httpCode == 400) { - $responseBody = $response->getBody()->getContents(); - Log::warning("请求支付api失败,状态码 400,响应体:" . $responseBody); - } + $responseBody = $response->getBody()->getContents(); + Log::warning("请求支付api失败,状态码: $httpCode ,响应体:" . $responseBody); + }else{ + Log::warning("请求支付api未知失败并且没有返回头:" . $e->getMessage()); } return json_decode($responseBody); }