mirror of
https://github.com/bitwarden/server.git
synced 2024-11-22 12:15:36 +01:00
check if already paid
This commit is contained in:
parent
377e6ff697
commit
e242539b84
@ -345,7 +345,7 @@ namespace Bit.Billing.Controllers
|
||||
throw new Exception("Invoice is null. " + parsedEvent.Id);
|
||||
}
|
||||
|
||||
if(invoice.AttemptCount > 1 && UnpaidAutoChargeInvoiceForSubscriptionCycle(invoice))
|
||||
if(!invoice.Paid && invoice.AttemptCount > 1 && UnpaidAutoChargeInvoiceForSubscriptionCycle(invoice))
|
||||
{
|
||||
await AttemptToPayInvoiceWithBraintreeAsync(invoice);
|
||||
}
|
||||
@ -357,7 +357,7 @@ namespace Bit.Billing.Controllers
|
||||
throw new Exception("Invoice is null. " + parsedEvent.Id);
|
||||
}
|
||||
|
||||
if(UnpaidAutoChargeInvoiceForSubscriptionCycle(invoice))
|
||||
if(!invoice.Paid && UnpaidAutoChargeInvoiceForSubscriptionCycle(invoice))
|
||||
{
|
||||
await AttemptToPayInvoiceWithBraintreeAsync(invoice);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user