This commit is contained in:
Tokumeikoi
2020-06-08 01:08:07 +08:00
parent 3df4e04605
commit 9b82df98f5
12 changed files with 60 additions and 21 deletions

View File

@ -23,6 +23,9 @@ class PayTaro
$curl = new Curl();
$curl->post('https://api.paytaro.com/v1/gateway/fetch', http_build_query($params));
$result = $curl->response;
if (!$result) {
abort(500, '网络异常');
}
if ($curl->error) {
$errors = (array)$result->errors;
abort(500, $errors[array_keys($errors)[0]][0]);