public Payment Paid() { this.Status = PaymentStatus.Succeed; RegisterEvent( OrderPaymentPaid .CreateNewOrderPaymentPaid( this.PaymentId.Value, this.Amount.Amount, this.Amount.Currency.ToString(), this.Status.ToString(), this.BeneficiaryAlias ) ); return(this); }
private void UpdateStatus(OrderPaymentPaid OrderPayment) { _events[OrderPayment.AggregateId].Paid(); }
public async Task Handle(OrderPaymentPaid notification, CancellationToken cancellationToken) { // Talk with NJaka about stream name await _eventSourcing.RaiseEventAsync(notification, $"{STREAMNAME}{notification.BeneficiaryAlias}"); }
private void AddBalance(OrderPaymentPaid orderPayment, Balance balance) { Balance = balance.Add(Money.FromDecimal(orderPayment.Amount, orderPayment.Currency, new CurrencyLookup())).Value; }