Exemplo n.º 1
0
        public PaymentRequestParam GetPaymentRequestParam()
        {
            DataSet ds = _Apdal.GetPaymentRequestParam();

            PaymentRequestParam a = new PaymentRequestParam();

            if (ds != null && ds.Tables[0] != null)
            {
                if (ds.Tables[0].Rows.Count > 0)
                {
                    List <PaymentRequestParamList> p = new List <PaymentRequestParamList>();
                    for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
                    {
                        PaymentRequestParamList Reason = new PaymentRequestParamList();
                        Reason.EncKey               = ds.Tables[0].Rows[i]["EncKey"].ToString();
                        Reason.PGMerchant_ID        = ds.Tables[0].Rows[i]["PGMerchant_ID"].ToString();
                        Reason.User_Name            = ds.Tables[0].Rows[i]["User_Name"].ToString();
                        Reason.OAuth_Password       = ds.Tables[0].Rows[i]["OAuth_Password"].ToString();
                        Reason.PaymentType          = ds.Tables[0].Rows[i]["PaymentType"].ToString();
                        Reason.Name                 = ds.Tables[0].Rows[i]["Name"].ToString();
                        Reason.VPA                  = ds.Tables[0].Rows[i]["VPA"].ToString();
                        Reason.merchantCategoryCode = ds.Tables[0].Rows[i]["merchantCategoryCode"].ToString();
                        Reason.PaymentType          = ds.Tables[0].Rows[i]["PaymentType"].ToString();
                        Reason.TxnType              = ds.Tables[0].Rows[i]["TxnType"].ToString();

                        p.Add(Reason);
                    }
                    a.Farmerc = p;
                }
            }
            return(a);
        }
Exemplo n.º 2
0
        public PaymentRequestParam GetPaymentRequestParam(string apiKey)
        {
            PaymentRequestParam fr = new PaymentRequestParam();

            if (apiKey == ConfigurationManager.AppSettings["reasonkey"])
            {
                try
                {
                    fr = _agentbal.GetPaymentRequestParam();
                }
                catch (Exception ex)
                {
                    LogBal.ErrorLog(this.GetType().Name, MethodBase.GetCurrentMethod().Name, ex.Message, 0);
                }
            }
            return(fr);
        }