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); }