From 9ef39bcadb740ac668859152f5cfd3913a4a3243 Mon Sep 17 00:00:00 2001 From: Chad Scharf <3904944+cscharf@users.noreply.github.com> Date: Wed, 13 May 2020 09:54:10 -0400 Subject: [PATCH] Removed payment_behavior, errant whitespace --- src/Core/Services/Implementations/OrganizationService.cs | 3 +-- src/Core/Services/Implementations/StripePaymentService.cs | 7 +++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Core/Services/Implementations/OrganizationService.cs b/src/Core/Services/Implementations/OrganizationService.cs index 9b62a32e02..254bc1f104 100644 --- a/src/Core/Services/Implementations/OrganizationService.cs +++ b/src/Core/Services/Implementations/OrganizationService.cs @@ -336,7 +336,7 @@ namespace Bit.Core.Services var prorationDate = DateTime.UtcNow; var seatItem = sub.Items?.Data?.FirstOrDefault(i => i.Plan.Id == plan.StripeSeatPlanId); - var subResponse = await subscriptionService.UpdateAsync(sub.Id, new SubscriptionUpdateOptions() + var subResponse = await subscriptionService.UpdateAsync(sub.Id, new SubscriptionUpdateOptions { Items = new List<SubscriptionItemOptions> { @@ -349,7 +349,6 @@ namespace Bit.Core.Services } }, ProrationBehavior = "always_invoice", - PaymentBehavior = "allow_incomplete", DaysUntilDue = 1, CollectionMethod = "send_invoice", ProrationDate = prorationDate, diff --git a/src/Core/Services/Implementations/StripePaymentService.cs b/src/Core/Services/Implementations/StripePaymentService.cs index 23539dcaf5..b591d2ac7b 100644 --- a/src/Core/Services/Implementations/StripePaymentService.cs +++ b/src/Core/Services/Implementations/StripePaymentService.cs @@ -705,7 +705,7 @@ namespace Bit.Core.Services { throw new GatewayException("Subscription not found."); } - + var prorationDate = DateTime.UtcNow; var storageItem = sub.Items?.FirstOrDefault(i => i.Plan.Id == storagePlanId); @@ -722,7 +722,6 @@ namespace Bit.Core.Services } }, ProrationBehavior = "always_invoice", - PaymentBehavior = "allow_incomplete", DaysUntilDue = 1, CollectionMethod = "send_invoice", ProrationDate = prorationDate, @@ -870,11 +869,11 @@ namespace Bit.Core.Services { // Finalize the invoice (from Draft) w/o auto-advance so we // can attempt payment manually. - invoice = await invoiceService.FinalizeInvoiceAsync(invoice.Id, new InvoiceFinalizeOptions() + invoice = await invoiceService.FinalizeInvoiceAsync(invoice.Id, new InvoiceFinalizeOptions { AutoAdvance = false, }); - var invoicePayOptions = new InvoicePayOptions() + var invoicePayOptions = new InvoicePayOptions { PaymentMethod = cardPaymentMethodId, };