mirror of
https://github.com/bitwarden/server.git
synced 2025-07-03 00:52:49 -05:00
adjust storage with payment intent/method handling
This commit is contained in:
@ -8,7 +8,7 @@ namespace Bit.Core.Utilities
|
||||
{
|
||||
public static class BillingHelpers
|
||||
{
|
||||
internal static async Task AdjustStorageAsync(IPaymentService paymentService, IStorableSubscriber storableSubscriber,
|
||||
internal static async Task<string> AdjustStorageAsync(IPaymentService paymentService, IStorableSubscriber storableSubscriber,
|
||||
short storageAdjustmentGb, string storagePlanId)
|
||||
{
|
||||
if(storableSubscriber == null)
|
||||
@ -51,8 +51,10 @@ namespace Bit.Core.Utilities
|
||||
}
|
||||
|
||||
var additionalStorage = newStorageGb - 1;
|
||||
await paymentService.AdjustStorageAsync(storableSubscriber, additionalStorage, storagePlanId);
|
||||
var paymentIntentClientSecret = await paymentService.AdjustStorageAsync(storableSubscriber,
|
||||
additionalStorage, storagePlanId);
|
||||
storableSubscriber.MaxStorageGb = newStorageGb;
|
||||
return paymentIntentClientSecret;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user