mirror of
https://github.com/bitwarden/server.git
synced 2025-05-18 01:55:37 -05:00
Set BU trial length to 4 (#5824)
This commit is contained in:
parent
3bf4f11c3a
commit
d72d721684
@ -694,6 +694,13 @@ public class ProviderBillingService(
|
|||||||
customer.Metadata.ContainsKey(BraintreeCustomerIdKey) ||
|
customer.Metadata.ContainsKey(BraintreeCustomerIdKey) ||
|
||||||
setupIntent.IsUnverifiedBankAccount());
|
setupIntent.IsUnverifiedBankAccount());
|
||||||
|
|
||||||
|
int? trialPeriodDays = provider.Type switch
|
||||||
|
{
|
||||||
|
ProviderType.Msp when usePaymentMethod => 14,
|
||||||
|
ProviderType.BusinessUnit when usePaymentMethod => 4,
|
||||||
|
_ => null
|
||||||
|
};
|
||||||
|
|
||||||
var subscriptionCreateOptions = new SubscriptionCreateOptions
|
var subscriptionCreateOptions = new SubscriptionCreateOptions
|
||||||
{
|
{
|
||||||
CollectionMethod = usePaymentMethod ?
|
CollectionMethod = usePaymentMethod ?
|
||||||
@ -707,7 +714,7 @@ public class ProviderBillingService(
|
|||||||
},
|
},
|
||||||
OffSession = true,
|
OffSession = true,
|
||||||
ProrationBehavior = StripeConstants.ProrationBehavior.CreateProrations,
|
ProrationBehavior = StripeConstants.ProrationBehavior.CreateProrations,
|
||||||
TrialPeriodDays = usePaymentMethod ? 14 : null
|
TrialPeriodDays = trialPeriodDays
|
||||||
};
|
};
|
||||||
|
|
||||||
if (featureService.IsEnabled(FeatureFlagKeys.PM19147_AutomaticTaxImprovements))
|
if (featureService.IsEnabled(FeatureFlagKeys.PM19147_AutomaticTaxImprovements))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user