1
0
mirror of https://github.com/bitwarden/server.git synced 2025-05-23 20:41:04 -05: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 var subCreateOptions = new SubscriptionCreateOptions
{ {
OffSession = true,
TrialPeriodDays = plan.TrialPeriodDays, TrialPeriodDays = plan.TrialPeriodDays,
DefaultPaymentMethodId = stipeCustomerPaymentMethodId, DefaultPaymentMethodId = stipeCustomerPaymentMethodId,
Items = new List<SubscriptionItemOption>(), Items = new List<SubscriptionItemOption>(),
@ -148,6 +149,7 @@ namespace Bit.Core.Services
PaymentMethodId = stipeCustomerPaymentMethodId, PaymentMethodId = stipeCustomerPaymentMethodId,
Metadata = stripeCustomerMetadata Metadata = stripeCustomerMetadata
}); });
subCreateOptions.AddExpand("latest_invoice.payment_intent");
subCreateOptions.CustomerId = customer.Id; subCreateOptions.CustomerId = customer.Id;
var subscriptionService = new SubscriptionService(); var subscriptionService = new SubscriptionService();
subscription = await subscriptionService.CreateAsync(subCreateOptions); subscription = await subscriptionService.CreateAsync(subCreateOptions);