Ejemplo n.º 1
0
        public PaypalPayment(
            Email email,
            string transactionCode,

            DateTime paidDate,
            DateTime expireDate,
            decimal total,
            decimal totalPaid,
            Address address,
            string payer,
            ValueObjects.Document document
            ) : base(paidDate, expireDate, total, totalPaid, address, payer, document)
        {
            Email           = email;
            TransactionCode = transactionCode;
        }
Ejemplo n.º 2
0
        public CreditCardPayment(
            string cardHolderName,
            string cardNumber,
            string lastTransactionNumber,

            DateTime paidDate,
            DateTime expireDate,
            decimal total,
            decimal totalPaid,
            Address address,
            string payer,
            ValueObjects.Document document
            ) : base(paidDate, expireDate, total, totalPaid, address, payer, document)
        {
            CardHolderName        = cardHolderName;
            CardNumber            = cardNumber;
            LastTransactionNumber = lastTransactionNumber;
        }
Ejemplo n.º 3
0
        protected Payment(DateTime paidDate, DateTime expireDate, decimal total, decimal totalPaid, Address address, string payer, ValueObjects.Document document)
        {
            Number     = Guid.NewGuid().ToString().Replace("-", "").Substring(0, 10).ToUpper();
            PaidDate   = paidDate;
            ExpireDate = expireDate;
            Total      = total;
            TotalPaid  = totalPaid;
            Address    = address;
            Payer      = payer;
            Document   = document;

            AddNotifications(new Contract()
                             .Requires()

                             .IsGreaterThan(0, Total, "Payment.Total", "O total não pode ser zero.")
                             .IsGreaterOrEqualsThan(Total, TotalPaid, "Payment.TotalPaid", "O valor total é menor que o valor pago.")
                             );
        }
Ejemplo n.º 4
0
        public BoletoPayment(
            string barCode,
            Email email,
            string boletoNumber,

            DateTime paidDate,
            DateTime expireDate,
            decimal total,
            decimal totalPaid,
            Address address,
            string payer,
            ValueObjects.Document document
            ) : base(paidDate, expireDate, total, totalPaid, address, payer, document)
        {
            BarCode      = barCode;
            Email        = email;
            BoletoNumber = boletoNumber;
        }