mirror of
https://github.com/bitwarden/server.git
synced 2024-11-23 12:25:16 +01:00
add a delay to invoice.payment_succeeded hook
This commit is contained in:
parent
f37f335120
commit
ed86a5f9d5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user