Comments (4)
I just understood the "at_period_end" logic. So "at_period_end" should indeed remain True (unless we want a different website usage model). However, the feedback message "Your subscription is active" is misleading. The template _subscription_status should instead return "Your subscription has been canceled. However you could use this website for another {until_end_period}".
The problem is that the template cannot not distinguish active subscriptions from those that have been canceled with "at_period_end=True". Therefore, for both it displays "Your subscription is active".
The way to go around this would be to rely on "CurrentSubscription.canceled_at": if "CurrentSubscription.cancel_at" exists, it means that the a subscription has been canceled and is only active until its "end_period", otherwise it's just (regularly) active. There is another "but", as the "cancel_at" attribute is set nowhere (and can currently not be relied on), whereas it should be set to a DateTime value (e.g. timezone.now()) in "Customer.cancel_subscription()".
If this is done, then the two cases (subscription truly active vs. has been canceled but is active until end_period) can be distinguished in the _subscription_status template.
from dj-stripe.
Hi @dollydagr - Do you have a pull request for this available or should I do the fix?
from dj-stripe.
Hi @pydanny - Yes, I just posted it!
from dj-stripe.
Sorry I did not see that you and Yasmine Charif had a pull request in the queue.
from dj-stripe.
Related Issues (20)
- ProgrammingError: column djstripe_product.default_price_id does not exist HOT 7
- Use case for multiple API Keys? HOT 9
- Plugin 'mkdocstrings' option 'watch' is breaking the docs HOT 2
- Failing webhook events in dj-stripe regarding Plan and Price HOT 2
- Having multiple projects breaks the webhook HOT 1
- The stripe api key placement is very confusing HOT 15
- Use AbstractModels HOT 1
- Webhook doesn't work if API keys removed from .env HOT 4
- Current state of the projects Documentation/Website
- v2.9 Release Checklist HOT 2
- Sync only Subscriptions with specific status HOT 2
- Initial Sync Fails to Import Charge data from Connect Express Accounts
- Re-enable Migration Check in Linter Action for Release 3.0
- Support an upgrade from 2.X HOT 4
- Webhooks for some users are failing after library update from 2.5 to 2.8 HOT 4
- Errors when manually running djstripe_sync_models
- API change for Sepa payments in their source api HOT 1
- Enhance Admin Interface to Dynamically Include All Properties as Read-Only Fields HOT 2
- Impossible to install dj-stripe to my django project HOT 6
- Event Process: pass new obj instance to signal
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 dj-stripe.