コード例 #1
0
        protected Payment(DateTime paidDate, DateTime expiredDate, decimal total, decimal totalPaid, string payer, Document document, Address address, Email email)
        {
            Number      = Guid.NewGuid().ToString().Replace("-", "").Substring(0, 10).ToUpper();
            PaidDate    = paidDate;
            ExpiredDate = expiredDate;
            Total       = total;
            TotalPaid   = totalPaid;
            Payer       = payer;
            Document    = document;
            Address     = address;
            Email       = email;

            AddNotifications(new Contract()
                             .Requires()
                             .IsGreaterThan(0, Total, "Payment.Total", "O total não pode ser zero")
                             .IsGreaterOrEqualsThan(Total, TotalPaid, "Payment.TotalPaid", "O valor pago é menor que o valor do pagamento"));
        }
コード例 #2
0
 public BoletoPayment(string barCode, string boletoNumber, DateTime paidDate, DateTime expiredDate, decimal total, decimal totalPaid, string payer, Document document, Address address, Email email)
     : base(paidDate, expiredDate, total, totalPaid, payer, document, address, email)
 {
     BarCode      = barCode;
     BoletoNumber = boletoNumber;
 }
コード例 #3
0
 public PayPalPayment(string transactionCode, DateTime paidDate, DateTime expireDate, decimal total, decimal totalPaid, string payer, Document document, Address address, Email email)
     : base(paidDate, expireDate, total, totalPaid, payer, document, address, email)
 {
     TransactionCode = transactionCode;
 }
コード例 #4
0
 protected Payment(DateTime paidDate, DateTime expireDate, decimal total, decimal totalPaid, string payer, EDocumentType document, Address address, Email email)
 {
     Number     = Guid.NewGuid().ToString().Replace("-", "").Substring(0, 10).ToUpper();
     PaidDate   = paidDate;
     ExpireDate = expireDate;
     Total      = total;
     TotalPaid  = totalPaid;
     Payer      = payer;
     Document   = document;
     Address    = address;
     Email      = email;
 }
コード例 #5
0
        public PaypalPayment(string tansactionCode, DateTime paidDate, DateTime expireDate, decimal total, decimal totalPaid, Document document, string payer, Address adress, Email email) : base(paidDate, expireDate, total, totalPaid, document, payer, adress, email)
        {
            TansactionCode = tansactionCode;

            if (string.IsNullOrEmpty(TansactionCode))
            {
                AddNotification("PaypalPayment.TansactionCode", "Numero de transação vazio");
            }
        }
コード例 #6
0
 public CreditCardPayment(string cardHolderName, string cardNumber, string lastTransactionNumber, DateTime paidDate, DateTime expireDate, decimal total, decimal totalPaid, Document document, string payer, Address address, Email email)
     : base(paidDate, expireDate, total, totalPaid, document, payer, address, email)
 {
     CardHolderName        = cardHolderName;
     CardNumber            = cardNumber;
     LastTransactionNumber = lastTransactionNumber;
 }