Laravel Cashier Stripe Trial creates new subscriptions, allows exploit -
i using laravel cashier add stripe payments (subscriptions) premium version of web app. users offered 5-day free trial (card in advance).
now happens is, create subscription using:
$user->newsubscription('premium','monthly')->trialdays(5)->create($stripetoken,['email' => $user->email], "")
works well, let's user cancels subscription within trial period.. on 'grace' period, let's 4 more days..
when these days passed, user lose account benefits, trial expire , subscription cancelled.
but, after that, if user wants subscribe again, since $subscription->resume() available during grace period, have create subscription using $user->newsubscription, generating new subscription on table , new trial period.. allowing them cancel again, wait 5 days, create 1 , repeat getting free trial days forever..
is there way "resume" existing subscription when cancelled , grace period over?
Comments
Post a Comment