Giter Site home page Giter Site logo

Comments (8)

cypreess avatar cypreess commented on August 22, 2024

@amitjindal Let me maybe describe what was the architectural idea behind django-plans and then you will be able to answer yourself if this fits your needs.

In django-plans each user has object UserPlan that describes which type of plan did he purchased and what is the expiration date of this plan. System is automatically checking when this expiration date happens and sends some mailing before. User is asked to manualy create new order for next period, this will generate Order Confirmation document, and then once paid user gets updated UserPlan with additional expiration time.

There is one extra thing, django-plans have also support different periods for plans, so you can define anything you want like 30 days or 365 days plan extend.

At this moment there is no support for automatic subscriptions, however I can easily see how this could be implemented as some feature. Here are my tips:

  • I would add a field to UserPlan automatic_renewal = True/False
  • I would add a field to PlanPricing definiton default_for_automatic_renewal=True/False
  • Add setting PLANS_AUTOMATIC_RENEWAL=True/False that would set the default state of the field in UserPlan when new user is created.

And then I would add an extra logic that when it sees that account is just going to be expired it first checks what kind of account it is (automatic renewal off or on) and then decide if its off - send email reminding customer to pay manualy, if its on it will search for PlanPricing matching user's current Plan that have attribute default_for_automatic_renewal=True.

That should do the trick and still be as flexible as possible.

from django-plans.

amitjindal avatar amitjindal commented on August 22, 2024

@cypreess Awesome. Thank you so much. I will try to figure this out and ask if I need help. I am also making changes to handle multi-tenant support since you use User objects in models and in multitenant the user is not in shared database.

Really appreciate your quick reply and help.

Regards
Amit

from django-plans.

Alir3z4 avatar Alir3z4 commented on August 22, 2024

@amitjindal were you able to get anywhere with this ?
Would love to know if you could get it done

from django-plans.

amitjindal avatar amitjindal commented on August 22, 2024

@Alir3z4 Nope. I didn't end up completing this and its still on back burner. It seemed much more complex to handle multi-tenancy with this.

However I do home to get back to this sometime soon.

from django-plans.

Alir3z4 avatar Alir3z4 commented on August 22, 2024

Oh, I see.
Thanks for letting us know about the result.

I leave this issue open for future discussion and possible implementation of this future.

from django-plans.

anuj9196 avatar anuj9196 commented on August 22, 2024

#100 This pull has added is_recurring flag to mark orders as recurring and one can easily use this field to do tasks accordingly.

from django-plans.

PetrDlouhy avatar PetrDlouhy commented on August 22, 2024

Hi,

I started with experimental implementation of recurring payments with the django-paypal.
I have written the code in the django-plans-paypal as connector to the django-plans.

Currently it doesn't need any support from the django-plans to have basic functionality. It simply creates new Order (uses the existing for first payment) and calls order.complete_order() when the succesfull PayPal IPN notification arrives.

Of course I would need to give the user information about state of his/hers subscribtion, so I will have to add some fields like those suggested by @cypreess and @anuj9196. I will try to make PR from this, when my implementation progress.

from django-plans.

PetrDlouhy avatar PetrDlouhy commented on August 22, 2024

Please review recurring code in PR #106

from django-plans.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.