This commit is contained in:
root 2019-10-27 19:44:12 +08:00
parent 0a4f7c9953
commit 2615c45220

View File

@ -55,13 +55,13 @@ class OrderController extends Controller
abort(500, '订阅不存在');
}
if (!($plan->show || $user->plan_id == $plan->id)) {
if (!($plan->show)) {
abort(500, '该订阅已售罄');
}
$order = new Order();
$order->user_id = $request->session()->get('id');
$order->plan_id = $plan->id;
$order->plan_data = serialize($plan->toArray());
$order->cycle = $request->input('cycle');
$order->trade_no = Helper::guid();
$order->total_amount = $plan[$request->input('cycle')];