GithubHelp home page GithubHelp logo

Comments (4)

dollydagr avatar dollydagr commented on July 19, 2024

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.

pydanny avatar pydanny commented on July 19, 2024

Hi @dollydagr - Do you have a pull request for this available or should I do the fix?

from dj-stripe.

dollydagr avatar dollydagr commented on July 19, 2024

Hi @pydanny - Yes, I just posted it!

from dj-stripe.

pydanny avatar pydanny commented on July 19, 2024

Sorry I did not see that you and Yasmine Charif had a pull request in the queue.

from dj-stripe.

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.