mirror of
https://github.com/v2board/v2board.git
synced 2024-11-10 17:49:11 +08:00
update: payment
This commit is contained in:
parent
6b31c39e6e
commit
2431ffaba7
@ -13,13 +13,17 @@ class PaymentController extends Controller
|
|||||||
{
|
{
|
||||||
public function notify($method, $id, Request $request)
|
public function notify($method, $id, Request $request)
|
||||||
{
|
{
|
||||||
$paymentService = new PaymentService($method, $id);
|
try {
|
||||||
$verify = $paymentService->notify($request->input());
|
$paymentService = new PaymentService($method, $id);
|
||||||
if (!$verify) abort(500, 'verify error');
|
$verify = $paymentService->notify($request->input());
|
||||||
if (!$this->handle($verify['trade_no'], $verify['callback_no'])) {
|
if (!$verify) abort(500, 'verify error');
|
||||||
abort(500, 'handle error');
|
if (!$this->handle($verify['trade_no'], $verify['callback_no'])) {
|
||||||
|
abort(500, 'handle error');
|
||||||
|
}
|
||||||
|
die('success');
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
abort(500, 'fail');
|
||||||
}
|
}
|
||||||
die('success');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function handle($tradeNo, $callbackNo)
|
private function handle($tradeNo, $callbackNo)
|
||||||
|
Loading…
Reference in New Issue
Block a user