mirror of
https://github.com/v2board/v2board.git
synced 2025-01-31 02:29:14 +08:00
update
This commit is contained in:
parent
0a4f7c9953
commit
2615c45220
@ -55,13 +55,13 @@ class OrderController extends Controller
|
|||||||
abort(500, '订阅不存在');
|
abort(500, '订阅不存在');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!($plan->show || $user->plan_id == $plan->id)) {
|
if (!($plan->show)) {
|
||||||
abort(500, '该订阅已售罄');
|
abort(500, '该订阅已售罄');
|
||||||
}
|
}
|
||||||
|
|
||||||
$order = new Order();
|
$order = new Order();
|
||||||
$order->user_id = $request->session()->get('id');
|
$order->user_id = $request->session()->get('id');
|
||||||
$order->plan_id = $plan->id;
|
$order->plan_data = serialize($plan->toArray());
|
||||||
$order->cycle = $request->input('cycle');
|
$order->cycle = $request->input('cycle');
|
||||||
$order->trade_no = Helper::guid();
|
$order->trade_no = Helper::guid();
|
||||||
$order->total_amount = $plan[$request->input('cycle')];
|
$order->total_amount = $plan[$request->input('cycle')];
|
||||||
|
Loading…
Reference in New Issue
Block a user