Skip to content
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

Best practise to create a continous subscription #10

Closed
Konafets opened this issue Apr 21, 2017 · 2 comments
Closed

Best practise to create a continous subscription #10

Konafets opened this issue Apr 21, 2017 · 2 comments

Comments

@Konafets
Copy link
Contributor

Konafets commented Apr 21, 2017

Hi,

in my application users should be able to subscribe to a montly plan and the subscription should get renewed every month until they cancel.

The workflow should be like:

  1. User subscribes to ProPlan
  2. User gets the ability to use the ProPlans features
  3. User gets invoiced (not part of the package but belongs to the workflow)
  4. User uses the service for one month
  5. Subscription of the user gets renewed (end date is set to next month)
  6. User gets a new invoice
    ...
    N. User cancels the plan
    N+1. Subscription is valid until end of the interval
    N+2. After subscription endet, User falls back to BasicPlan

I found the renew() method but this will reset the feature usage data, which is not what I want. Or should I consider every month as a new subscription?

@gerardojbaez
Copy link
Owner

You can override the renew() method on the subscription model and that way apply the appropriate logic.

Clearing subscription usage data when a subscription is renewed should be optional. I'll add a configuration for this soon.

Creating a new subscription every month is another possibility, but I think it's a problem to manage.

@Konafets
Copy link
Contributor Author

Thanks for the answer. I used my own implementation of renew().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants