mirror of
https://github.com/v2board/v2board.git
synced 2025-01-11 08:39:09 +08:00
update
This commit is contained in:
parent
0c2090cb3c
commit
c29bd836eb
@ -126,7 +126,17 @@ class OrderController extends Controller
|
|||||||
$order->trade_no = Helper::guid();
|
$order->trade_no = Helper::guid();
|
||||||
$order->total_amount = $request->input('total_amount');
|
$order->total_amount = $request->input('total_amount');
|
||||||
|
|
||||||
$orderService->setOrderType($user);
|
$order = $this->order;
|
||||||
|
if ($order->cycle === 'reset_price') {
|
||||||
|
$order->type = 4;
|
||||||
|
} else if ($user->plan_id !== NULL && $order->plan_id !== $user->plan_id) {
|
||||||
|
$order->type = 3;
|
||||||
|
} else if ($user->expired_at > time() && $order->plan_id == $user->plan_id) {
|
||||||
|
$order->type = 2;
|
||||||
|
} else {
|
||||||
|
$order->type = 1;
|
||||||
|
}
|
||||||
|
|
||||||
$orderService->setInvite($user);
|
$orderService->setInvite($user);
|
||||||
|
|
||||||
if (!$order->save()) {
|
if (!$order->save()) {
|
||||||
|
@ -46,8 +46,7 @@ class OrderService
|
|||||||
$order = $this->order;
|
$order = $this->order;
|
||||||
if ($order->cycle === 'reset_price') {
|
if ($order->cycle === 'reset_price') {
|
||||||
$order->type = 4;
|
$order->type = 4;
|
||||||
}
|
} else if ($user->plan_id !== NULL && $order->plan_id !== $user->plan_id) {
|
||||||
if ($user->plan_id !== NULL && $order->plan_id !== $user->plan_id) {
|
|
||||||
if (!(int)config('v2board.plan_change_enable', 1)) abort(500, '目前不允许更改订阅,请联系客服或提交工单操作');
|
if (!(int)config('v2board.plan_change_enable', 1)) abort(500, '目前不允许更改订阅,请联系客服或提交工单操作');
|
||||||
$order->type = 3;
|
$order->type = 3;
|
||||||
$this->getSurplusValue($user, $order);
|
$this->getSurplusValue($user, $order);
|
||||||
|
Loading…
Reference in New Issue
Block a user