mirror of
https://github.com/bitwarden/server
synced 2025-12-14 23:33:41 +00:00
update stripe sdk
This commit is contained in:
@@ -185,6 +185,7 @@ namespace Bit.Core.Services
|
||||
// They must have been on a free plan. Create new sub.
|
||||
var subCreateOptions = new StripeSubscriptionCreateOptions
|
||||
{
|
||||
CustomerId = organization.GatewayCustomerId,
|
||||
TrialPeriodDays = newPlan.TrialPeriodDays,
|
||||
Items = new List<StripeSubscriptionItemOption>(),
|
||||
Metadata = new Dictionary<string, string> {
|
||||
@@ -210,7 +211,7 @@ namespace Bit.Core.Services
|
||||
});
|
||||
}
|
||||
|
||||
await subscriptionService.CreateAsync(organization.GatewayCustomerId, subCreateOptions);
|
||||
await subscriptionService.CreateAsync(subCreateOptions);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -468,6 +469,7 @@ namespace Bit.Core.Services
|
||||
|
||||
var subCreateOptions = new StripeSubscriptionCreateOptions
|
||||
{
|
||||
CustomerId = customer.Id,
|
||||
TrialPeriodDays = plan.TrialPeriodDays,
|
||||
Items = new List<StripeSubscriptionItemOption>(),
|
||||
Metadata = new Dictionary<string, string> {
|
||||
@@ -504,7 +506,7 @@ namespace Bit.Core.Services
|
||||
|
||||
try
|
||||
{
|
||||
subscription = await subscriptionService.CreateAsync(customer.Id, subCreateOptions);
|
||||
subscription = await subscriptionService.CreateAsync(subCreateOptions);
|
||||
}
|
||||
catch(StripeException)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user