-
Notifications
You must be signed in to change notification settings - Fork 1.5k
[PM-30908]Correct Premium subscription status handling #6877
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
base: main
Are you sure you want to change the base?
[PM-30908]Correct Premium subscription status handling #6877
Conversation
|
Great job! No new security vulnerabilities introduced in this pull request |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #6877 +/- ##
==========================================
- Coverage 56.08% 56.05% -0.04%
==========================================
Files 1968 1968
Lines 86937 86977 +40
Branches 7744 7750 +6
==========================================
- Hits 48756 48751 -5
- Misses 36378 36422 +44
- Partials 1803 1804 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
kdenney
left a comment
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.
Nice job; just a couple suggestions and a request for more tests. :)
src/Core/Billing/Premium/Commands/CreatePremiumCloudHostedSubscriptionCommand.cs
Outdated
Show resolved
Hide resolved
src/Core/Billing/Premium/Commands/CreatePremiumCloudHostedSubscriptionCommand.cs
Outdated
Show resolved
Hide resolved
amorask-bitwarden
left a comment
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.
A few things and a couple missed requirements:
- We should no longer auto-cancel and void invoices for premium subscriptions that enter unpaid or incomplete_expired status. We should still disable premium.
- The UpdatePaymentMethodCommand’s AddPayPalAsync method needs to be updated to do the same thing as Task 2 above (pay the single, incomplete subscription invoice) using the IBraintreeService.PayInvoice method when the user adds or replaces their PayPal payment method.
src/Core/Billing/Premium/Commands/CreatePremiumCloudHostedSubscriptionCommand.cs
Outdated
Show resolved
Hide resolved
src/Core/Billing/Premium/Commands/CreatePremiumCloudHostedSubscriptionCommand.cs
Outdated
Show resolved
Hide resolved
4551244 to
8b3f29a
Compare
…n-status-handling

🎟️ Tracking
https://bitwarden.atlassian.net/browse/PM-30908
📔 Objective
Fix premium subscription status handling to enable resubscription for users with canceled or expired subscriptions, and improve incomplete subscription payment retry logic.
Changes
API Layer (AccountBillingVNextController.cs:105)
Payment Processing (PaymentMethodAttachedHandler.cs:107-136)
Subscription Management (SubscriptionUpdatedHandler.cs:120-131)
Premium Subscription Creation (CreatePremiumCloudHostedSubscriptionCommand.cs:75-154)
Subscription Query (GetBitwardenSubscriptionQuery.cs:41-46)
📸 Screenshots
https://github.com/user-attachments/assets/ccef0537-32ee-4920-9c39-fa79e10625a4
https://github.com/user-attachments/assets/4c7d71fc-3ce0-4a3a-b304-4dced91853a0
https://github.com/user-attachments/assets/ea66df1d-6d74-46e4-8fed-2e02bca804f1
⏰ 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