我正在使用 Laravel 作为支付网关。对于支付网关,我使用 Stripe。当我运行这段代码时,它会告诉我:没有这样的计划:1 个错误控制器:public function create(Request $request, Plan $plan) { if($request->user()->subscribedToPlan($plan->stripe_plan, 'main')) { return redirect()->route('home')->with('success', 'You have already subscribed the plan'); } $plan = Plan::findOrFail($request->get('plan')); $stripeToken = $request->stripeToken; $user = $request->user(); $stripeplan = $request->stripe_plan; $planid = $request->plan; $user->newSubscription($stripeplan, $planid)->create($stripeToken, [ ]); return redirect()->route('home')->with('success', 'Your plan subscribed successfully'); }
- 1 回答
- 0 关注
- 92 浏览
添加回答
举报
0/150
提交
取消