Skip to content
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

Merged
merged 2 commits into from
May 29, 2024

Conversation

ajay-sentry
Copy link
Contributor

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.

@@ -381,7 +378,6 @@ def create_checkout_session(self, owner: Owner, desired_plan):
success_url=success_url,
cancel_url=cancel_url,
customer=customer,
Copy link
Contributor

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

Copy link
Contributor Author

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-notifications
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codecov-qa
Copy link

codecov-qa bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.43%. Comparing base (9c8a6aa) to head (933a537).

✅ 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              
Flag Coverage Δ
unit 91.43% <ø> (-0.01%) ⬇️
unit-latest-uploader 91.43% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
services/billing.py 92.33% <ø> (-0.15%) ⬇️

📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today!

Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.43%. Comparing base (9c8a6aa) to head (933a537).

✅ All tests successful. No failed tests found ☺️

Impacted file tree graph

@@            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              
Flag Coverage Δ
unit 91.43% <ø> (-0.01%) ⬇️
unit-latest-uploader 91.43% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
services/billing.py 92.33% <ø> (-0.15%) ⬇️

Impacted file tree graph

Copy link

codecov bot commented May 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.87%. Comparing base (9c8a6aa) to head (933a537).

✅ 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           
Flag Coverage Δ
unit 91.43% <ø> (-0.01%) ⬇️
unit-latest-uploader 91.43% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ajay-sentry ajay-sentry added this pull request to the merge queue May 29, 2024
Merged via the queue into main with commit cadd7d7 May 29, 2024
21 of 22 checks passed
@ajay-sentry ajay-sentry deleted the Ajay/remove-email-prefill branch May 29, 2024 20:50
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.

2 participants