mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	update: payment
This commit is contained in:
		| @@ -13,13 +13,17 @@ class PaymentController extends Controller | ||||
| { | ||||
|     public function notify($method, $id, Request $request) | ||||
|     { | ||||
|         $paymentService = new PaymentService($method, $id); | ||||
|         $verify = $paymentService->notify($request->input()); | ||||
|         if (!$verify) abort(500, 'verify error'); | ||||
|         if (!$this->handle($verify['trade_no'], $verify['callback_no'])) { | ||||
|             abort(500, 'handle error'); | ||||
|         try { | ||||
|             $paymentService = new PaymentService($method, $id); | ||||
|             $verify = $paymentService->notify($request->input()); | ||||
|             if (!$verify) abort(500, 'verify 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) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user