-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[PM-19956] [PM-18795] Require provider payment method during setup behind FF #5752
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
[PM-19956] [PM-18795] Require provider payment method during setup behind FF #5752
Conversation
Great job, no security vulnerabilities found in this Pull Request |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #5752 +/- ##
==========================================
- Coverage 50.43% 47.25% -3.18%
==========================================
Files 1633 1633
Lines 74211 74298 +87
Branches 6681 6692 +11
==========================================
- Hits 37425 35110 -2315
- Misses 35272 37734 +2462
+ Partials 1514 1454 -60 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
It looks good to me! I'd like to see some more tests added
bitwarden_license/src/Commercial.Core/AdminConsole/Services/ProviderService.cs
Show resolved
Hide resolved
bitwarden_license/test/Commercial.Core.Test/Billing/ProviderBillingServiceTests.cs
Outdated
Show resolved
Hide resolved
|
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.
Great work!
🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-19956
https://bitwarden.atlassian.net/browse/PM-18795
📔 Objective
This PR updates the Provider Setup Flow to require a payment method when the
pm-19956-require-provider-payment-method-during-setup
flag is enabled.Full process updates include:
ProviderSetupRequestModel
to require tax information now that Consolidated Billing is enshrined. It also adds an optionalPaymentSource
property that will be sent by the client when the feature flag is on.ProviderService.CompleteSetupAsync
method to take an optionalTokenizedPaymentSource
that gets gleaned from the request in step 1. If the feature flag is on, it validates the payment source and passes it to theProviderBillingService.SetupCustomer
method.ProviderBillingService.SetupCustomer
method to take this optionalTokenizedPaymentSource
and, if the feature flag is on and the payment source is sent, it attaches the payment source to the newly created customer.ProviderBillingService.StartSubscription
method so that when the feature flag is on and the customer has an attached payment method, it sets the provider subscription tocharge_automatically
with a trial length of 14 days per PM-19795.Associated Clients PR: bitwarden/clients#14550
📸 Screenshots
Card
Screen.Recording.2025-04-29.at.11.27.47.AM.mov
Bank Account
Screen.Recording.2025-04-29.at.11.41.01.AM.mov
PayPal
Screen.Recording.2025-04-29.at.11.42.31.AM.mov
⏰ Reminders before review
🦮 Reviewer guidelines
:+1:
) or similar for great changes:memo:
) or ℹ️ (:information_source:
) for notes or general info:question:
) for questions:thinking:
) or 💭 (:thought_balloon:
) for more open inquiry that's not quite a confirmed issue and could potentially benefit from discussion:art:
) for suggestions / improvements:x:
) or:warning:
) for more significant problems or concerns needing attention:seedling:
) or ♻️ (:recycle:
) for future improvements or indications of technical debt:pick:
) for minor or nitpick changes