1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-28 03:51:23 +01:00

add missing sub create options

This commit is contained in:
Kyle Spearrin 2019-08-10 12:07:24 -04:00
parent bc5322f4cf
commit e60f1a4f50

View File

@ -91,6 +91,7 @@ namespace Bit.Core.Services
var subCreateOptions = new SubscriptionCreateOptions
{
OffSession = true,
TrialPeriodDays = plan.TrialPeriodDays,
DefaultPaymentMethodId = stipeCustomerPaymentMethodId,
Items = new List<SubscriptionItemOption>(),
@ -148,6 +149,7 @@ namespace Bit.Core.Services
PaymentMethodId = stipeCustomerPaymentMethodId,
Metadata = stripeCustomerMetadata
});
subCreateOptions.AddExpand("latest_invoice.payment_intent");
subCreateOptions.CustomerId = customer.Id;
var subscriptionService = new SubscriptionService();
subscription = await subscriptionService.CreateAsync(subCreateOptions);