Skip to content

Commit

Permalink
Generate id for SmartVoucherSold if it is missing in the event
Browse files Browse the repository at this point in the history
  • Loading branch information
IliyanIlievPH committed May 13, 2020
1 parent 52a2b8c commit 51cbf00
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using System.Threading.Tasks;
using System;
using System.Threading.Tasks;
using Common.Log;
using Lykke.Common.Log;
using Lykke.RabbitMqBroker.Subscriber;
Expand Down Expand Up @@ -35,7 +36,9 @@ protected override async Task ProcessMessageAsync(SmartVoucherSoldEvent message)
ShortCode = message.VoucherShortCode,
Timestamp = message.Timestamp,
CampaignId = message.CampaignId,
PaymentRequestId = message.PaymentRequestId,
PaymentRequestId = string.IsNullOrEmpty(message.PaymentRequestId)
? Guid.NewGuid().ToString()
: message.PaymentRequestId,
};

await _operationsService.ProcessSmartVoucherSoldEventAsync(dto);
Expand Down

0 comments on commit 51cbf00

Please sign in to comment.