Comments (8)
@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.
@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.
@amitjindal were you able to get anywhere with this ?
Would love to know if you could get it done
from django-plans.
@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.
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.
#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.
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.
Please review recurring code in PR #106
from django-plans.
Related Issues (20)
- Use with django_rest_framework HOT 1
- Duplicated invoice numbers HOT 2
- Error expiring plans with Celery 5.0.0 HOT 4
- TAX is applied if the user fills in VAT ID without country code
- Add support for Django 3.2 HOT 1
- Migrating to Github Actions HOT 3
- Automatic publish to PyPI HOT 18
- Python 3.9, 3.10 support (install fails with `vatnumber`) HOT 3
- [bug] geolite2 missing from requirements
- Problem with Migrations
- Django plans cause error in sqlite3 backend HOT 2
- Demo project not work HOT 7
- Implement the multi user capability for one billing info HOT 1
- Implementing the price per unit
- Documentation incorrect and/or outdate
- Add support for trial plan
- Add ecomerce tracking to complete order HOT 2
- UNIQUE constraint failed: plans_plan.default HOT 2
- stripe and paypal HOT 3
- Quota.codename should be SlugField HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-plans.