mirror of
https://github.com/bitwarden/server.git
synced 2025-05-20 19:14:32 -05:00
Don't try to credit customer \$0 (#4964)
This commit is contained in:
parent
edd31bcf4e
commit
f149f247d5
@ -325,13 +325,16 @@ public class ProviderMigrator(
|
|||||||
|
|
||||||
var organizationCancellationCredit = organizationCustomers.Sum(customer => customer.Balance);
|
var organizationCancellationCredit = organizationCustomers.Sum(customer => customer.Balance);
|
||||||
|
|
||||||
await stripeAdapter.CustomerBalanceTransactionCreate(provider.GatewayCustomerId,
|
if (organizationCancellationCredit != 0)
|
||||||
new CustomerBalanceTransactionCreateOptions
|
{
|
||||||
{
|
await stripeAdapter.CustomerBalanceTransactionCreate(provider.GatewayCustomerId,
|
||||||
Amount = organizationCancellationCredit,
|
new CustomerBalanceTransactionCreateOptions
|
||||||
Currency = "USD",
|
{
|
||||||
Description = "Unused, prorated time for client organization subscriptions."
|
Amount = organizationCancellationCredit,
|
||||||
});
|
Currency = "USD",
|
||||||
|
Description = "Unused, prorated time for client organization subscriptions."
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
var migrationRecords = await Task.WhenAll(organizations.Select(organization =>
|
var migrationRecords = await Task.WhenAll(organizations.Select(organization =>
|
||||||
clientOrganizationMigrationRecordRepository.GetByOrganizationId(organization.Id)));
|
clientOrganizationMigrationRecordRepository.GetByOrganizationId(organization.Id)));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user