コード例 #1
0
ファイル: Dover.Designer.cs プロジェクト: felipecsl/dover
 /// <summary>
 /// Create a new Payment object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="referenceDate">Initial value of the ReferenceDate property.</param>
 /// <param name="paid">Initial value of the Paid property.</param>
 public static Payment CreatePayment(global::System.Int32 id, global::System.DateTime referenceDate, global::System.Boolean paid)
 {
     Payment payment = new Payment();
     payment.Id = id;
     payment.ReferenceDate = referenceDate;
     payment.Paid = paid;
     return payment;
 }
コード例 #2
0
ファイル: Dover.Designer.cs プロジェクト: felipecsl/dover
 /// <summary>
 /// Deprecated Method for adding a new object to the Payment EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToPayment(Payment payment)
 {
     base.AddObject("Payment", payment);
 }
コード例 #3
0
ファイル: PayPalController.cs プロジェクト: felipecsl/dover
        private bool AmountPaidIsValid(Payment _pmnt, decimal amountPaid)
        {
            //pull the order
            bool result = true;

            if (_pmnt != null) {
                if (_pmnt.Amount > amountPaid) {
                    //_logger.Warn("Invalid order amount to PDT/IPN: " + order.ID + "; Actual: " + amountPaid.ToString("C") + "; Should be: " + order.Total.ToString("C") + "user IP is " + Request.UserHostAddress);
                    result = false;
                }
            }
            else {
                //_logger.Warn("Invalid order ID passed to PDT/IPN; user IP is " + Request.UserHostAddress);
            }
            return result;
        }