transfer
This commit is contained in:
parent
b765f7057e
commit
2d95e7824b
@ -74,7 +74,7 @@ class WechatPayService
|
||||
],
|
||||
];
|
||||
}
|
||||
try {
|
||||
// try {
|
||||
$appid = config("wechat.official_account.default.app_id");
|
||||
$data = [
|
||||
"appid" => $appid,
|
||||
@ -92,17 +92,17 @@ class WechatPayService
|
||||
]);
|
||||
$res = json_decode($resp->getBody(), true);
|
||||
return ["code" => 0, "err_msg" => "", "data" => $res];
|
||||
} catch (\Exception $e) {
|
||||
// 进行异常捕获并进行错误判断处理
|
||||
Log::info($e->getMessage());
|
||||
if ($e instanceof \GuzzleHttp\Exception\RequestException && $e->hasResponse()) {
|
||||
$r = $e->getResponse();
|
||||
$res = json_decode($r->getBody());
|
||||
return ["code" => 1, "err_msg" => $r->getBody(), "data" => null];
|
||||
}
|
||||
// } catch (\Exception $e) {
|
||||
// // 进行异常捕获并进行错误判断处理
|
||||
// Log::info($e->getMessage());
|
||||
// if ($e instanceof \GuzzleHttp\Exception\RequestException && $e->hasResponse()) {
|
||||
// $r = $e->getResponse();
|
||||
// $res = json_decode($r->getBody());
|
||||
// return ["code" => 1, "err_msg" => $r->getBody(), "data" => null];
|
||||
// }
|
||||
|
||||
return ["code" => 1, "err_msg" => $e->getMessage(), "data" => null];
|
||||
}
|
||||
// return ["code" => 1, "err_msg" => $e->getMessage(), "data" => null];
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user