Ejemplo n.º 1
0
        public async Task MarkRequestsAsExpiredAsync()
        {
            var expiredPaymentsIds = await _paymentsRepository.GetExpiredRequestsAsync();

            foreach (var expiredPaymentId in expiredPaymentsIds)
            {
                var error = await _paymentsStatusUpdater.ExpireRequestAsync(expiredPaymentId);

                if (error != PaymentStatusUpdateErrorCodes.None)
                {
                    _log.Warning("Failed to mark payment request as expired",
                                 context: new { error, expiredPaymentId });
                }
            }
        }