16 lines
652 B
C#
16 lines
652 B
C#
namespace NetinaShop.Domain.Entities.Accounting;
|
|
|
|
public partial class Payment
|
|
{
|
|
public static Payment Create(string factorNumber, double amount, string description, string transactionCode, string cardPan, string authority, PaymentType type, PaymentStatus status, Guid orderId, Guid userId)
|
|
{
|
|
return new Payment(factorNumber, amount, description, transactionCode, cardPan, authority, type, status, orderId, userId);
|
|
}
|
|
|
|
public void ChangeStatus(PaymentStatus status, string? cardPan = null)
|
|
{
|
|
this.Status = status;
|
|
if (status != PaymentStatus.Paid && cardPan != null)
|
|
CardPan = cardPan;
|
|
}
|
|
} |