1
0
mirror of https://github.com/bitwarden/server synced 2025-12-31 23:53:17 +00:00

[AC-2678] Enterprise to Families Sponsorship Bugs (#4118)

* Removed prorationDate as it wasn't used, and wasn't needed

* Fixed logic to detect if a subscription was sponsored

* Moved OrganizationSponsorshipsController.cs to Billing folder
This commit is contained in:
Conner Turnbull
2024-06-03 13:18:46 -04:00
committed by GitHub
parent 9eec986c1c
commit 395d6e845c
10 changed files with 75 additions and 77 deletions

View File

@@ -1199,7 +1199,9 @@ public class StripeController : Controller
}
private static bool IsSponsoredSubscription(Subscription subscription) =>
StaticStore.SponsoredPlans.Any(p => p.StripePlanId == subscription.Id);
StaticStore.SponsoredPlans
.Any(p => subscription.Items
.Any(i => i.Plan.Id == p.StripePlanId));
/// <summary>
/// Handles the <see cref="HandledStripeWebhook.PaymentFailed"/> event type from Stripe.