コード例 #1
0
        public async Task Handle(OrderPaidDomainEvent notification, CancellationToken cancellationToken)
        {
            var order = await _suitAlterationRepository.GetByIdAsync(notification.SuitAlterationId);

            // e.g. we can send payment info or whatever to the customer email
            await _notifierService.OnOrderPaidNotification(order.Id);
        }
コード例 #2
0
        public async Task <Unit> Handle(MarkOrderAsPaidCommand request, CancellationToken cancellationToken)
        {
            SuitAlteration suitAlteration = await _suitAlterationRepository.GetByIdAsync(request.SuitAlterationId);

            suitAlteration.MarkOrderAsPaid();

            return(Unit.Value);
        }