Skip to content

Commit

Permalink
Merge pull request #16 from IliyanIlievPH/15
Browse files Browse the repository at this point in the history
Generate id for SmartVoucherSold if it is missing in the event
  • Loading branch information
starkmsu authored May 13, 2020
2 parents 52a2b8c + 51cbf00 commit 1976ee8
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 1976ee8

Please sign in to comment.