no message
This commit is contained in:
parent
845cdc809a
commit
adcfcf11c0
@ -115,13 +115,13 @@ final class Epay extends Base
|
||||
$res = $client->request('POST', $this->epay['apiurl'] . 'mapi.php', ['form_params' => $data]);
|
||||
|
||||
if ($res->getStatusCode() !== 200) {
|
||||
throw new Exception();
|
||||
throw new Exception("return code 不等于200");
|
||||
}
|
||||
|
||||
$resData = json_decode($res->getBody()->__toString(), true);
|
||||
|
||||
if ($resData['code'] !== 1 || ! isset($resData['payurl'])) {
|
||||
throw new Exception();
|
||||
throw new Exception("没有payurl");
|
||||
}
|
||||
|
||||
return $response->withHeader('HX-Redirect', $resData['payurl'])->withJson([
|
||||
@ -135,8 +135,16 @@ final class Epay extends Base
|
||||
// 'msg' => json_encode($e->getMessage()),
|
||||
// ]);
|
||||
// } else {
|
||||
|
||||
$aMsg = [
|
||||
'标题' => '有用户微信支付失败',
|
||||
'报错' => $e->getMessage(),
|
||||
'返回值' => $res
|
||||
];
|
||||
|
||||
(new Telegram())->send(0, '有用户微信支付失败');
|
||||
$sMsg = json_encode($aMsg, JSON_UNESCAPED_UNICODE | JSON_PRETTY_PRINT);
|
||||
|
||||
(new Telegram())->send(0, $sMsg);
|
||||
|
||||
return $response->withJson([
|
||||
'ret' => 0,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user