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

feat: Add success after failed payment email (and fix card in failed-payment email) #1065

Merged

Conversation

spalmurray-codecov
Copy link
Contributor

This PR adds the logic for sending the new success-after-failed-payment email template. It also addresses a bug where the card wasn't being properly populated on the other failed-payment email.

Closes codecov/engineering-team#2503
Closes codecov/engineering-team#3119

@@ -70,9 +101,13 @@ def invoice_payment_failed(self, invoice: stripe.Invoice) -> None:
admins = get_all_admins_for_owners(owners)

task_service = TaskService()
payment_intent = stripe.PaymentIntent.retrieve(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Turns out you gotta go get the card in the PaymentIntent explicitly. Annoying that it's another fetch, but oh well, this code isn't time critical enough for that to matter.

Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.02%. Comparing base (dde7496) to head (f99d736).
Report is 1 commits behind head on main.

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1065   +/-   ##
=======================================
  Coverage   96.02%   96.02%           
=======================================
  Files         828      828           
  Lines       19434    19444   +10     
=======================================
+ Hits        18661    18671   +10     
  Misses        773      773           
Flag Coverage Δ
unit 92.30% <100.00%> (+<0.01%) ⬆️
unit-latest-uploader 92.30% <100.00%> (+<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.

@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!

Copy link
Contributor

✅ All tests successful. No failed tests were found.

📣 Thoughts on this report? Let Codecov know! | Powered by Codecov

@spalmurray-codecov spalmurray-codecov marked this pull request as ready for review December 19, 2024 03:06
billing/views.py Show resolved Hide resolved
@spalmurray-codecov spalmurray-codecov added this pull request to the merge queue Dec 19, 2024
Merged via the queue into main with commit ad92471 Dec 19, 2024
19 checks passed
@spalmurray-codecov spalmurray-codecov deleted the spalmurray/add-success-after-failed-payment-email branch December 19, 2024 20:27
Copy link

sentry-io bot commented Dec 22, 2024

Suspect Issues

This pull request was deployed and Sentry observed the following issues:

  • ‼️ RateLimitError: Request req_yRuXb4Ooc0OVVf: This object cannot be accessed right now because another API request ... /billing/stripe/webhooks View Issue

Did you find this useful? React with a 👍 or 👎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants