Example #1
0
        /// <summary>
        /// Get a collection of donation transactions
        /// </summary>
        /// <param name="dateTimeToBeProcessed">Date/time when transaction is being processed</param>
        /// <param name="paymentProcessStatus">Enum process status</param>
        /// <param name="paymentMethod">Enum of payment type (credit card, direct debit)</param>
        /// <returns>Collection of donation transaction details</returns>
        public IEnumerable <TransactionDetail> GetDonationTransactionsByStatus_ForProcessing(DateTime dateTimeToBeProcessed, PaymentGatewayProcessing.Helpers.Enums.PaymentProcessStatus status, PaymentGatewayProcessing.Helpers.Enums.PaymentMethod method)
        {
            byte statusValue = (byte)status;
            byte methodValue = (byte)method;

            using (var db = new GenerousAPIEntities())
            {
                var donationTransactionList = from trans in db.TransactionDetails
                                              where
                                              trans.ProcessDateTime <= dateTimeToBeProcessed &&
                                              trans.ProcessStatusId == statusValue &&
                                              trans.PaymentMethodId == methodValue &&
                                              trans.DoNotProcess == false
                                              select trans;

                return(donationTransactionList.ToList <TransactionDetail>());
            }
        }
 /// <summary>
 /// Get a collection of donation transactions
 /// </summary>
 /// <param name="dateTimeToBeProcessed">Date/time when transaction is being processed</param>
 /// <param name="paymentProcessStatus">Enum process status</param>
 /// <param name="paymentMethod">Enum of payment type (credit card, direct debit)</param>
 /// <returns>Collection of donation transaction details</returns>
 public IEnumerable <TransactionDetail> GetDonationTransactionsByStatus_ForProcessing(DateTime dateTimeToBeProcessed, PaymentGatewayProcessing.Helpers.Enums.PaymentProcessStatus processStatus, PaymentGatewayProcessing.Helpers.Enums.PaymentMethod PaymentMethod)
 {
     return(_ITransactionDetailsDAL.GetDonationTransactionsByStatus_ForProcessing(dateTimeToBeProcessed, processStatus, PaymentMethod));
 }