mirror of
https://github.com/bitwarden/server
synced 2025-12-15 15:53:59 +00:00
add a delay to invoice.payment_succeeded hook
This commit is contained in:
@@ -333,6 +333,11 @@ namespace Bit.Billing.Controllers
|
||||
var subscription = await subscriptionService.GetAsync(invoice.SubscriptionId);
|
||||
if(subscription?.Status == "active")
|
||||
{
|
||||
if(DateTime.UtcNow - invoice.Created < TimeSpan.FromMinutes(1))
|
||||
{
|
||||
await Task.Delay(5000);
|
||||
}
|
||||
|
||||
var ids = GetIdsFromMetaData(subscription.Metadata);
|
||||
// org
|
||||
if(ids.Item1.HasValue)
|
||||
|
||||
Reference in New Issue
Block a user