Exemple #1
0
 public List<PaymentHistory> PaymentHistory(String AccountId)
 {
     List<PaymentHistory> lstPAyments = null;
     try
     {
         PCITokenDataModel context = new PCITokenDataModel();
         var payment = context.PymtHistory(AccountId);
         var payments = from p in payment
                        select new PaymentHistory
                        {
                            Accountid = p.Accountid,
                            PaymentAmount = p.PaymentAmount.ToString(),
                            PaymentDate = p.PaymentDate,
                            Void = p.Void == "Y" ? true : false,
                            Reversal = p.Reversal == "Y" ? true : false,
                            TransactionStatus = p.TransactionStatus,
                            TransactionNumber = p.TransactionNumber
                        };
         lstPAyments = new List<PaymentHistory>(payments.ToList());
     }
     catch (Exception)
     {
         lstPAyments = null;
     }
     return lstPAyments;
 }
Exemple #2
0
        public string ReversePayment(string AccountId, string TransactionNumber)
        {
            string ReturnValue = string.Empty;
            try
            {
                PCITokenDataModel context = new PCITokenDataModel();
                int val = context.ReversePayment(AccountId, TransactionNumber);
                if (val > 0)
                    ReturnValue = "OK";
                else
                    ReturnValue = "Error";

            }
            catch (Exception)
            {
                ReturnValue = "Error";
            }
            return ReturnValue;
        }
Exemple #3
0
        public string MakeWalletPayment(Payment objPayment)
        {
            string ReturnValue = string.Empty;
            try
            {
                PCITokenDataModel context = new PCITokenDataModel();
                int val = context.walletPayment(objPayment.Accountid, Convert.ToDecimal(objPayment.PaymentAmount), objPayment.TokenID);
                if (val > 0)
                    ReturnValue = "OK";
                else
                    ReturnValue = "Error";

            }
            catch (Exception)
            {
                ReturnValue = "Error";
            }
            return ReturnValue;
        }
Exemple #4
0
        public string MakePayment(Payment objPayment)
        {
            string ReturnValue = string.Empty;
            try
            {
                PCITokenDataModel context = new PCITokenDataModel();
                int val = context.insertpayment(objPayment.Accountid, Convert.ToDecimal(objPayment.PaymentAmount), objPayment.BankAccountNumber, objPayment.RoutingNumber, objPayment.CreditCard);
                if (val > 0)
                    ReturnValue = "OK";
                else
                    ReturnValue = "Error";

            }
            catch (Exception)
            {
                ReturnValue = "Error";
            }
            return ReturnValue;
        }