Esempio n. 1
0
        public async Task HandleFundableEventAsync(MFunding_FundableEvent eventData)
        {
            using var log = BeginFunction(nameof(FundingEventMicroService), nameof(HandleFundableEventAsync), eventData);
            try
            {
                using var ctx = CreateQuiltContext();

                if (eventData.FundsReceived != 0)
                {
                    if (TryParseOrderId.FromFundableReference(eventData.FundableReference, out var orderId))
                    {
                        _ = await OrderMicroService.SetFundsReceivedAsync(orderId, eventData.FundsReceived, eventData.UnitOfWork).ConfigureAwait(false);
                    }
                }
            }
            catch (Exception ex)
            {
                log.Exception(ex);
                throw;
            }
        }