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 ACH payment method #1083

Merged
merged 10 commits into from
Jan 16, 2025
Merged

feat: Add ACH payment method #1083

merged 10 commits into from
Jan 16, 2025

Conversation

suejung-sentry
Copy link
Contributor

@suejung-sentry suejung-sentry commented Jan 7, 2025

This PR does below to add compatibility for ACH payment method.

  1. Adds a Stripe createSetupIntent api (via GraphQL) so our frontend can fetch a clientSecret when it wants to save payment methods using the UI PaymentElement (formerly using the CardElement that does not require this).
  2. Updates to use the Stripe dashboard as the source of truth for the payment method configuration ID in the CheckoutSession and the new PaymentElement. If not specified, it uses the Default in the stripe dashboard.
  3. Adds a should_propagate knob on the existing update_email api as the ACH payment method requires an associated billing_email (where it was optional on credit card). With our UI designs, we specify email in a separate component, so have that component propagate the info to the default_payment_method using this updated api.
  4. Adds the serializers and GraphQL types for the U.S. bank account (ACH) related info for the Views in gazebo UI.

The changes to these apis are all backwards compatible so can go in before any UI changes go live.

Part of this project: codecov/engineering-team#2622
Closes codecov/engineering-team#3115
Closes codecov/engineering-team#3114
Closes codecov/engineering-team#3110

@suejung-sentry suejung-sentry force-pushed the sshin/stripe-setup-intent branch from 9f023ab to 058e85f Compare January 7, 2025 00:35
Copy link

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 93.75000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 96.08%. Comparing base (ddb4755) to head (3567fbb).
Report is 1 commits behind head on main.

❌ We are unable to process any of the uploaded JUnit XML files. Please ensure your files are in the right format.

Files with missing lines Patch % Lines
services/billing.py 80.95% 4 Missing ⚠️
utils/test_utils.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1083      +/-   ##
==========================================
- Coverage   96.09%   96.08%   -0.01%     
==========================================
  Files         829      832       +3     
  Lines       19384    19459      +75     
==========================================
+ Hits        18627    18698      +71     
- Misses        757      761       +4     
Flag Coverage Δ
unit 96.00% <93.75%> (-0.01%) ⬇️
unit-latest-uploader 96.00% <93.75%> (-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-notifications bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 93.75000% with 5 lines in your changes missing coverage. Please review.

✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
services/billing.py 80.95% 4 Missing ⚠️
utils/test_utils.py 0.00% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

Copy link
Contributor

github-actions bot commented Jan 7, 2025

✅ All tests successful. No failed tests were found.

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

@suejung-sentry suejung-sentry force-pushed the sshin/stripe-setup-intent branch from 02cfe7f to fea79e0 Compare January 13, 2025 07:18
@suejung-sentry suejung-sentry force-pushed the sshin/stripe-setup-intent branch from fea79e0 to 0d80364 Compare January 13, 2025 16:44
@suejung-sentry suejung-sentry changed the title feat: Add stripe setupIntent api feat: Add ACH payment method Jan 13, 2025
@suejung-sentry suejung-sentry force-pushed the sshin/stripe-setup-intent branch 2 times, most recently from 834f022 to fd0f925 Compare January 14, 2025 03:28
@suejung-sentry suejung-sentry force-pushed the sshin/stripe-setup-intent branch from fd0f925 to 5301ad6 Compare January 14, 2025 03:35
@suejung-sentry suejung-sentry marked this pull request as ready for review January 14, 2025 03:35
@suejung-sentry suejung-sentry requested a review from a team as a code owner January 14, 2025 03:35
@codecov codecov deleted a comment from codecov-qa bot Jan 14, 2025
@codecov codecov deleted a comment from codecov-public-qa bot Jan 14, 2025
services/billing.py Outdated Show resolved Hide resolved
services/billing.py Outdated Show resolved Hide resolved
services/billing.py Outdated Show resolved Hide resolved
@suejung-sentry suejung-sentry force-pushed the sshin/stripe-setup-intent branch from aa6df89 to 71d2628 Compare January 14, 2025 21:51
@suejung-sentry suejung-sentry force-pushed the sshin/stripe-setup-intent branch from 71d2628 to 86999ee Compare January 14, 2025 21:55
@suejung-sentry suejung-sentry force-pushed the sshin/stripe-setup-intent branch from 86999ee to 8ea30ac Compare January 14, 2025 23:02
services/billing.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ajay-sentry ajay-sentry left a comment

Choose a reason for hiding this comment

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

lgtm! Just two more minor nits

@suejung-sentry suejung-sentry force-pushed the sshin/stripe-setup-intent branch from 2829141 to 530136c Compare January 15, 2025 02:58
@suejung-sentry suejung-sentry added this pull request to the merge queue Jan 16, 2025
Merged via the queue into main with commit 020e7cf Jan 16, 2025
13 of 19 checks passed
@suejung-sentry suejung-sentry deleted the sshin/stripe-setup-intent branch January 16, 2025 01:00
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