1
0
mirror of https://github.com/bitwarden/server synced 2025-12-14 23:33:41 +00:00

update stripe sdk

This commit is contained in:
Kyle Spearrin
2018-09-13 10:28:51 -04:00
parent 07855a3203
commit 8fde736e98
3 changed files with 15 additions and 8 deletions

View File

@@ -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)
{