mirror of
https://github.com/bitwarden/server.git
synced 2025-07-05 10:02:47 -05: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