mirror of
https://github.com/bitwarden/server
synced 2025-12-16 16:23:31 +00:00
check if already paid
This commit is contained in:
@@ -345,7 +345,7 @@ namespace Bit.Billing.Controllers
|
|||||||
throw new Exception("Invoice is null. " + parsedEvent.Id);
|
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);
|
await AttemptToPayInvoiceWithBraintreeAsync(invoice);
|
||||||
}
|
}
|
||||||
@@ -357,7 +357,7 @@ namespace Bit.Billing.Controllers
|
|||||||
throw new Exception("Invoice is null. " + parsedEvent.Id);
|
throw new Exception("Invoice is null. " + parsedEvent.Id);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(UnpaidAutoChargeInvoiceForSubscriptionCycle(invoice))
|
if(!invoice.Paid && UnpaidAutoChargeInvoiceForSubscriptionCycle(invoice))
|
||||||
{
|
{
|
||||||
await AttemptToPayInvoiceWithBraintreeAsync(invoice);
|
await AttemptToPayInvoiceWithBraintreeAsync(invoice);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user