update: payment

This commit is contained in:
tokumeikoi 2021-04-29 01:39:45 +09:00
parent 6b31c39e6e
commit 2431ffaba7

View File

@ -13,6 +13,7 @@ class PaymentController extends Controller
{ {
public function notify($method, $id, Request $request) public function notify($method, $id, Request $request)
{ {
try {
$paymentService = new PaymentService($method, $id); $paymentService = new PaymentService($method, $id);
$verify = $paymentService->notify($request->input()); $verify = $paymentService->notify($request->input());
if (!$verify) abort(500, 'verify error'); if (!$verify) abort(500, 'verify error');
@ -20,6 +21,9 @@ class PaymentController extends Controller
abort(500, 'handle error'); abort(500, 'handle error');
} }
die('success'); die('success');
} catch (\Exception $e) {
abort(500, 'fail');
}
} }
private function handle($tradeNo, $callbackNo) private function handle($tradeNo, $callbackNo)