1
0
mirror of https://github.com/bitwarden/server.git synced 2025-02-02 23:41:21 +01:00

undo CancelAtPeriodEnd on reinstate

This commit is contained in:
Kyle Spearrin 2018-10-14 22:10:34 -04:00
parent d10d25afea
commit 455123c0c9

View File

@ -245,8 +245,8 @@ namespace Bit.Core.Services
throw new GatewayException("Subscription is not marked for cancellation.");
}
// Just touch the subscription.
var updatedSub = await subscriptionService.UpdateAsync(sub.Id, new StripeSubscriptionUpdateOptions { });
var updatedSub = await subscriptionService.UpdateAsync(sub.Id,
new StripeSubscriptionUpdateOptions { CancelAtPeriodEnd = false });
if(updatedSub.CanceledAt.HasValue)
{
throw new GatewayException("Unable to reinstate subscription.");