mirror of
				https://github.com/v2board/v2board.git
				synced 2025-10-31 09:21:46 +08:00 
			
		
		
		
	update
This commit is contained in:
		| @@ -83,6 +83,7 @@ class OrderController extends Controller | ||||
|                 die('order is paid'); | ||||
|             } | ||||
|             $order->status = 1; | ||||
|             $order->callback_no = $obj['id']; | ||||
|             if (!$order->save()) { | ||||
|                 abort(500, 'fail'); | ||||
|             } | ||||
|   | ||||
| @@ -231,13 +231,11 @@ class OrderController extends Controller | ||||
|         if (!$source['redirect']['url']) { | ||||
|             abort(500, '支付网关请求失败'); | ||||
|         } | ||||
|  | ||||
|         Redis::set($source['id'], $order->trade_no); | ||||
|         Redis::expire($source['id'], 3600); | ||||
|         $order->callback_no = $source['id']; | ||||
|         if (!$order->save()) { | ||||
|             abort(500, '订单更新失败'); | ||||
|          | ||||
|         if (!Redis::set($source['id'], $order->trade_no)) { | ||||
|             abort(500, '订单创建失败'); | ||||
|         } | ||||
|         Redis::expire($source['id'], 3600); | ||||
|         return $source['redirect']['url']; | ||||
|     } | ||||
|  | ||||
| @@ -258,13 +256,10 @@ class OrderController extends Controller | ||||
|         if (!$source['wechat']['qr_code_url']) { | ||||
|             abort(500, '支付网关请求失败'); | ||||
|         } | ||||
|  | ||||
|         Redis::set($source['id'], $order->trade_no); | ||||
|         Redis::expire($source['id'], 3600); | ||||
|         $order->callback_no = $source['id']; | ||||
|         if (!$order->save()) { | ||||
|             abort(500, '订单更新失败'); | ||||
|         if (!Redis::set($source['id'], $order->trade_no)) { | ||||
|             abort(500, '订单创建失败'); | ||||
|         } | ||||
|         Redis::expire($source['id'], 3600); | ||||
|         return $source['wechat']['qr_code_url']; | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user