mirror of
https://github.com/v2board/v2board.git
synced 2025-06-15 14:17:48 +08:00
update: opt code
This commit is contained in:
@ -27,9 +27,8 @@ class CommController extends Controller
|
||||
->where('payment', 'StripeCredit')
|
||||
->first();
|
||||
if (!$payment) abort(500, 'payment is not found');
|
||||
$config = json_decode($payment->config, true);
|
||||
return response([
|
||||
'data' => $config['stripe_pk_live']
|
||||
'data' => $payment->config['stripe_pk_live']
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
@ -27,8 +27,7 @@ class CouponController extends Controller
|
||||
abort(500, __('This coupon has expired'));
|
||||
}
|
||||
if ($coupon->limit_plan_ids) {
|
||||
$limitPlanIds = json_decode($coupon->limit_plan_ids);
|
||||
if (!in_array($request->input('plan_id'), $limitPlanIds)) {
|
||||
if (!in_array($request->input('plan_id'), $coupon->limit_plan_ids)) {
|
||||
abort(500, __('The coupon code cannot be used for this subscription'));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user