-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Remove prefilled email for customer if exists #587
Conversation
services/billing.py
Outdated
@@ -381,7 +378,6 @@ def create_checkout_session(self, owner: Owner, desired_plan): | |||
success_url=success_url, | |||
cancel_url=cancel_url, | |||
customer=customer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could write this as customer = owner.stripe_customer_id
, as it will be None or the value, so 369-371 isn't needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh yeah good point! will make the change
Codecov ReportAll modified and coverable lines are covered by tests ✅ ✅ All tests successful. No failed tests found. 📢 Thoughts on this report? Let us know! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. @@ Coverage Diff @@
## main #587 +/- ##
==========================================
- Coverage 91.43% 91.43% -0.01%
==========================================
Files 604 604
Lines 16113 16108 -5
==========================================
- Hits 14733 14728 -5
Misses 1380 1380
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found @@ Coverage Diff @@
## main #587 +/- ##
==========================================
- Coverage 91.43% 91.43% -0.01%
==========================================
Files 604 604
Lines 16113 16108 -5
==========================================
- Hits 14733 14728 -5
Misses 1380 1380
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
✅ All tests successful. No failed tests found. Additional details and impacted files@@ Coverage Diff @@
## main #587 +/- ##
===========================================
Coverage 95.87000 95.87000
===========================================
Files 782 782
Lines 17431 17426 -5
===========================================
- Hits 16712 16707 -5
Misses 719 719
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Purpose/Motivation
Customer issue around prefilled email being prefilled but incorrect, stripe docs don't seem to allow changing of prefilled email when creating stripe session so we're looking to remove the prefill altogether.
Related Docs: https://docs.stripe.com/api/checkout/sessions/create
Links to relevant tickets
N/A
What does this PR do?
This PR simply removes email from being passed into the stripe checkout session, but still defaulting the customer value if it exists.
Notes to Reviewer
Anything to note to the team? Any tips on how to review, or where to start?
Legal Boilerplate
Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. In 2022 this entity acquired Codecov and as result Sentry is going to need some rights from me in order to utilize my contributions in this PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.