コード例 #1
0
        private MessageClass LogPayaNewPayInfor()
        {
            var bc = new MessageClass();

            if (!string.IsNullOrEmpty(Convert.ToString(Session["InstitutionCode"])))
            {
                var xpresspaytransId = HashPasswordHelper.GetUniqueKey(6);
                var newTransRefNo    = "PAYREF" + xpresspaytransId;
                Session["newTransRefNo"] = newTransRefNo;

                var instutud         = Convert.ToString(Session["InstitutionCode"]);
                var commandToExecute = new SqlCommand("Barsh.LogTransaction_InsertOrUpdate")
                {
                    CommandType = CommandType.StoredProcedure
                };
                commandToExecute.Parameters.AddWithValue("@TransRefNo", newTransRefNo);
                commandToExecute.Parameters.AddWithValue("@Surname", Session["dbSurname"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@OtherNames", Session["dbOtherNames"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@Address", Session["dbAddress"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@Email", Session["dbEmail"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@PhoneNo", Session["dbPhoneNo"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@RevenueName", Session["dbRevenueName"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@RevenueCode", Session["dbRevenueCode"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@AgencyName", Session["dbAgencyName"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@AgencyCode", Session["dbAgencyCode"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@AmountPaid", Convert.ToDecimal(Session["transDbAmount"].ObjectToString()));
                commandToExecute.Parameters.AddWithValue("@PayGateWay", Session["dbPayGateWay"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@institutionCode", instutud);
                commandToExecute.Parameters.AddWithValue("@CountryName", Session["dbCountryName"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@StateName", Session["dbStateName"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@LGA", Session["dbLGA"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@City", Session["dbCity"].ObjectToString());
                commandToExecute.Parameters.AddWithValue("@Area", Session["dbArea"].ObjectToString());

                var recCount = DataBaseHandler.ExecuteSqlCommand(commandToExecute);
                bc.StatusId = recCount > 0 ? 1 : 0;
                if (recCount > 0)
                {
                    bc          = Selectgateway(newTransRefNo);
                    bc.StatusId = 1;
                }
                else
                {
                    bc.StatusMessage = "Unable to fetch all logged transaction";
                    bc.StatusId      = -1;
                }
            }
            else
            {
                bc.StatusMessage = "Invalid Merchant Code";
                bc.StatusId      = -1;
            }
            return(bc);
        }
コード例 #2
0
        private MessageClass CheckAgencyExeception()
        {
            var messageClass = new MessageClass();
            var cmdMyQuery   = new SqlCommand("Barsh.Querr_CheckAgencyException")
            {
                CommandType = CommandType.StoredProcedure
            };

            cmdMyQuery.Parameters.AddWithValue("@AgencyCode", LblAgencyID.Text);
            cmdMyQuery.Parameters.AddWithValue("@StateCode", LblMerchantCode.Text);
            var dtresponse           = DataBaseHandler.SqlSelect(cmdMyQuery);
            var xpressResponseResult = Newtonsoft.Json.JsonConvert.SerializeObject(dtresponse);

            Console.WriteLine(dtresponse);

            if (dtresponse.Rows.Count > 0)
            {
                //Session["Payer"] = "Payer";
                //Session["RevAgency"] = "RevAgency";
                ////Session["RevException"] = string.Empty;
                //Session["agencyName"] = LblAgencyName.Text;
                //Session["agencyID"] = LblAgencyID.Text;
                //Session["revenueName"] = LblSelectedRevName.Text;
                //Response.Redirect("~/PayerSearch");
                CheckRevenueExeception();
            }
            else
            {
                Session["Payer"]        = "Payer";
                Session["RevException"] = string.Empty;
                Session["RevAgency"]    = string.Empty;
                Session["agencyName"]   = LblAgencyName.Text;
                Session["agencyID"]     = LblAgencyID.Text;
                Session["revenueName"]  = LblSelectedRevName.Text;
                Session["revenueID"]    = LblSelectRevID.Text;
                Session["NoPayerRefNo"] = string.Empty;
                //var xpresspaytransId = HashPasswordHelper.GeneratePassword(10);
                var xpresspaytransId = HashPasswordHelper.GetUniqueKey(6);
                Session["transidno"]   = "PAYREF" + xpresspaytransId;
                Session["url"]         = LbluseUrl.Text;
                Session["DbGateWayID"] = LblDbGatewayName.Text;
                Session["StateName"]   = LbluseUrl.Text;
                Session["StateCode"]   = LblMerchantCode.Text;
                Response.Redirect("~/PayerDetails");
            }

            return(messageClass);
        }
コード例 #3
0
        private void RedirectToPayement()
        {
            Session["Payer"]        = "Payer";
            Session["RevException"] = string.Empty;
            Session["RevAgency"]    = string.Empty;
            Session["agencyName"]   = LblAgencyName.Text;
            Session["agencyID"]     = LblAgencyID.Text;
            Session["revenueName"]  = LblSelectedRevName.Text;
            Session["revenueID"]    = LblSelectRevID.Text;
            Session["NoPayerRefNo"] = string.Empty;
            //var xpresspaytransId = HashPasswordHelper.GeneratePassword(10);
            var xpresspaytransId = HashPasswordHelper.GetUniqueKey(6);

            Session["transidno"]   = "PAYREF" + xpresspaytransId;
            Session["url"]         = LbluseUrl.Text;
            Session["DbGateWayID"] = LblDbGatewayName.Text;
            Session["StateName"]   = LbluseUrl.Text;
            Session["StateCode"]   = LblMerchantCode.Text;
            Response.Redirect("~/PayerDetails");
        }