mirror of
https://github.com/v2board/v2board.git
synced 2025-01-25 15:39:10 +08:00
opt paytaro error report
This commit is contained in:
parent
c82acafdf8
commit
168b0ad72e
@ -22,10 +22,10 @@ class PayTaro
|
|||||||
$params['sign'] = md5($str);
|
$params['sign'] = md5($str);
|
||||||
$curl = new Curl();
|
$curl = new Curl();
|
||||||
$curl->post('https://api.paytaro.com/v1/gateway/fetch', http_build_query($params));
|
$curl->post('https://api.paytaro.com/v1/gateway/fetch', http_build_query($params));
|
||||||
if ($curl->error) {
|
|
||||||
abort(500, '接口请求失败');
|
|
||||||
}
|
|
||||||
$result = $curl->response;
|
$result = $curl->response;
|
||||||
|
if ($curl->error) {
|
||||||
|
abort(500, $result->errors[array_keys($result->errors)[0]]);
|
||||||
|
}
|
||||||
$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