Skip to content

Conversation

@kuboschek
Copy link
Contributor

  • Use Stripe Checkout for signups
  • Use Stripe Customer Portal for adjusting subscriptions

@kuboschek kuboschek requested a review from tkw1536 July 31, 2025 07:31
Copy link
Member

@tkw1536 tkw1536 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good in principle, except for the minor comments.

@staticmethod
def get_tier_from_stripe_id(stripe_id: str) -> str:
"""Maps a Stripe plan ID to a membership tier."""
stripe_to_tier_map = {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be a global map (as in outsider the function)?

pass


class CancellablePaymentMethodForm(PaymentMethodForm):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason for this class? Both it and the parent class are empty. Wouldn't one be enough?

# if this was not created from an update operation, do nothing
if not validated.created_from_update:
return super().dispatch_success(validated)
def dispatch_success(self, validated: Any) -> HttpResponse:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you're passing validated to the redirect response, shouldn't the type be str or something?

@kuboschek
Copy link
Contributor Author

@tkw1536 There are two realities - one in which Selenium tests are hard to fix and one in which I am not good at writing Selenium tests.

Help

@tkw1536
Copy link
Member

tkw1536 commented Aug 8, 2025

It looks like it's trying to test the old stripe integration and failing those tests. Possibly because you've some part of it.
You could try to run locally with SELENIUM_HEADLESS=0 to see what exactly is failing?

@kuboschek kuboschek merged commit a0d7046 into main Aug 9, 2025
2 of 6 checks passed
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

Successfully merging this pull request may close these issues.

3 participants