mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 09:39:10 +08:00
mgate: fix error report
This commit is contained in:
parent
e3aa467a74
commit
4852e6e79d
@ -29,9 +29,15 @@ class MGate
|
|||||||
abort(500, '网络异常');
|
abort(500, '网络异常');
|
||||||
}
|
}
|
||||||
if ($curl->error) {
|
if ($curl->error) {
|
||||||
|
if (isset($result->errors)) {
|
||||||
$errors = (array)$result->errors;
|
$errors = (array)$result->errors;
|
||||||
abort(500, $errors[array_keys($errors)[0]][0]);
|
abort(500, $errors[array_keys($errors)[0]][0]);
|
||||||
}
|
}
|
||||||
|
if (isset($result->message)) {
|
||||||
|
abort(500, $result->message);
|
||||||
|
}
|
||||||
|
abort(500, '未知错误');
|
||||||
|
}
|
||||||
$curl->close();
|
$curl->close();
|
||||||
if (!isset($result->data->trade_no)) {
|
if (!isset($result->data->trade_no)) {
|
||||||
abort(500, '接口请求失败');
|
abort(500, '接口请求失败');
|
||||||
|
Loading…
Reference in New Issue
Block a user