-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow trials without credit cards #737
Conversation
Currently trial subscriptions are handled completely by Stripe, and they don't have an option to allow them without entering payment information first. This branch moves trial subscriptions to be handled by us, so that we don't need to have that requirement in place. It also refactors the code that decides which users have which features, because it was getting pretty muddy having so many features with so many possible grantors of that feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if I'm missing something, but I see the schema.rb file is changed but I don't see any migration file as part of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, forgot to git add
the migration and the controller 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good once that one test is fixed.
Currently trial subscriptions are handled completely by Stripe, and they don't have an option to allow them without entering payment information first.
This branch moves trial subscriptions to be handled by us, so that we don't need to have that requirement in place.
It also refactors the code that decides which users have which features, because it was getting pretty muddy having so many features with so many possible grantors of that feature. Now, each model that can grant a feature (Subscription, PatreonUser, and now SubscriptionTrial) has the same interface and can be easily queried en masse by User.
Also letting some more
rufo
lint leak through. I'm pretty confident I want us to switch to it.Fixes #732.