mirror of
https://github.com/bitwarden/server.git
synced 2025-04-06 21:48:12 -05: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);
|
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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user