mercredi 19 juin 2019

In Laravel Using Stripe -> No such plan: 1 error

I am Using Laravel for payment gateway .for payment gateway i use Stripe. when i runnuing some code it will show me No such plan: 1 error 


 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');
        }

I am Using Laravel for payment gateway .for payment gateway i use Stripe. when i runnuing some code it will show me No such plan: 1 error



from Newest questions tagged laravel-5 - Stack Overflow http://bit.ly/31JQjLo
via IFTTT

Aucun commentaire:

Enregistrer un commentaire