mirror of
https://github.com/bitwarden/server.git
synced 2025-06-20 02:48:03 -05:00

* Added null checks when getting customer metadata * Added additional logging around paypal payments * Refactor region validation in StripeController * Update region retrieval method in StripeController Refactored the method GetCustomerRegionFromMetadata in StripeController. Previously, it returned null in case of nonexisting region key. Now, it checks all keys with case-insensitive comparison, and if no "region" key is found, it defaults to "US". This was done to handle cases where the region key might not be properly formatted or missing. * Updated switch expression to be switch statement * Updated new log to not log user input * Add handling for 'payment_method.attached' webhook * Cancelling unpaid premium subscriptions * Update hardcoded Stripe status strings to constants * Updated expand string to use snake_case * Removed unnecessary comments
14 lines
472 B
C#
14 lines
472 B
C#
namespace Bit.Billing.Constants;
|
|
|
|
public static class StripeSubscriptionStatus
|
|
{
|
|
public const string Trialing = "trialing";
|
|
public const string Active = "active";
|
|
public const string Incomplete = "incomplete";
|
|
public const string IncompleteExpired = "incomplete_expired";
|
|
public const string PastDue = "past_due";
|
|
public const string Canceled = "canceled";
|
|
public const string Unpaid = "unpaid";
|
|
public const string Paused = "paused";
|
|
}
|