mirror of
https://github.com/bitwarden/server.git
synced 2024-11-27 13:05:23 +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);
|
var subscription = await subscriptionService.GetAsync(invoice.SubscriptionId);
|
||||||
if(subscription?.Status == "active")
|
if(subscription?.Status == "active")
|
||||||
{
|
{
|
||||||
|
if(DateTime.UtcNow - invoice.Created < TimeSpan.FromMinutes(1))
|
||||||
|
{
|
||||||
|
await Task.Delay(5000);
|
||||||
|
}
|
||||||
|
|
||||||
var ids = GetIdsFromMetaData(subscription.Metadata);
|
var ids = GetIdsFromMetaData(subscription.Metadata);
|
||||||
// org
|
// org
|
||||||
if(ids.Item1.HasValue)
|
if(ids.Item1.HasValue)
|
||||||
|
Loading…
Reference in New Issue
Block a user