diff --git a/src/Core/Models/Business/BillingInfo.cs b/src/Core/Models/Business/BillingInfo.cs index 47491900a8..48f74a3c87 100644 --- a/src/Core/Models/Business/BillingInfo.cs +++ b/src/Core/Models/Business/BillingInfo.cs @@ -196,7 +196,11 @@ namespace Bit.Core.Models.Business public BillingInvoice(Subscription sub) { - Amount = sub.NextBillAmount.GetValueOrDefault(); + Amount = sub.NextBillAmount.GetValueOrDefault() + sub.Balance.GetValueOrDefault(); + if(Amount < 0) + { + Amount = 0; + } Date = sub.NextBillingDate; } diff --git a/src/Core/Services/Implementations/BraintreePaymentService.cs b/src/Core/Services/Implementations/BraintreePaymentService.cs index 4bc7397e42..4edcc59e63 100644 --- a/src/Core/Services/Implementations/BraintreePaymentService.cs +++ b/src/Core/Services/Implementations/BraintreePaymentService.cs @@ -40,7 +40,8 @@ namespace Bit.Core.Services AddOns = new AddOnsRequest(), Options = new SubscriptionOptionsRequest { - ProrateCharges = true + ProrateCharges = true, + RevertSubscriptionOnProrationFailure = true } }; @@ -64,7 +65,8 @@ namespace Bit.Core.Services new UpdateAddOnRequest { ExistingId = storageItem.Id, - Quantity = additionalStorage + Quantity = additionalStorage, + NeverExpires = true } }; }