mirror of
https://github.com/bitwarden/server.git
synced 2024-11-29 13:25:17 +01:00
Subscription update to maintain auto charge (#803)
This commit is contained in:
parent
130c3e4748
commit
d7b00f6c27
@ -381,11 +381,18 @@ namespace Bit.Core.Services
|
||||
// This proration behavior prevents a false "credit" from
|
||||
// being applied forward to the next month's invoice
|
||||
ProrationBehavior = "none",
|
||||
CollectionMethod = "charge_automatically",
|
||||
});
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
// Change back the subscription collection method
|
||||
await subscriptionService.UpdateAsync(sub.Id, new SubscriptionUpdateOptions
|
||||
{
|
||||
CollectionMethod = "charge_automatically",
|
||||
});
|
||||
|
||||
organization.Seats = (short?)newSeatTotal;
|
||||
await ReplaceAndUpdateCache(organization);
|
||||
return paymentIntentClientSecret;
|
||||
|
@ -778,11 +778,18 @@ namespace Bit.Core.Services
|
||||
// This proration behavior prevents a false "credit" from
|
||||
// being applied forward to the next month's invoice
|
||||
ProrationBehavior = "none",
|
||||
CollectionMethod = "charge_automatically",
|
||||
});
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
// Change back the subscription collection method
|
||||
await subscriptionService.UpdateAsync(sub.Id, new SubscriptionUpdateOptions
|
||||
{
|
||||
CollectionMethod = "charge_automatically",
|
||||
});
|
||||
|
||||
return paymentIntentClientSecret;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user