Example #1
0
        public Payment(OrderId orderId)
        {
            this.Id          = new PaymentId(Guid.NewGuid());
            this._createDate = DateTime.UtcNow;
            this._orderId    = orderId;
            this._status     = PaymentStatus.ToPay;
            this._emailNotificationIsSent = false;

            this.AddDomainEvent(new PaymentCreatedEvent(this.Id, this._orderId));
        }
Example #2
0
 public PaymentCreatedEvent(PaymentId paymentId, OrderId orderId)
 {
     this.PaymentId = paymentId;
     this.OrderId   = orderId;
 }