Esempio n. 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            kkx = null;

            if ((Session["pwalletID"] != null) && (Session["pwalletID"].ToString() != ""))
            {
                adminID = Session["pwalletID"].ToString();
            }
            else
            {
                Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
            }
            if (Session["fullname"] != null)
            {
                fullname = Session["fullname"].ToString();
            }
            if (Session["email"] != null)
            {
                email = Session["email"].ToString();
            }
            if (Session["mobile"] != null)
            {
                mobile = Session["mobile"].ToString();
            }
            if (Session["cust_id"] != null)
            {
                cust_id = Session["cust_id"].ToString();
            }
            xstring = new StringBuilder();
            product_id = ConfigurationManager.AppSettings["pd_product_id"];
            mackey = ConfigurationManager.AppSettings["pd_mackey"];
            check_trans_page = ConfigurationManager.AppSettings["pd_get_trans_json_page"];
            if ((Request.Form["txnRef"] != null) && (Request.Form["txnRef"] != ""))
            {
                txnref = Request.Form["txnRef"].ToString();
                Session["transID"] = txnref;
            }
            if ((Request.Form["payRef"] != null) && (Request.Form["payRef"] != ""))
            {
                payRef = Request.Form["payRef"].ToString();
            }
            if ((Request.Form["retRef"] != null) && (Request.Form["retRef"] != ""))
            {
                retRef = Request.Form["retRef"].ToString();
            }
            if ((Request.Form["cardNum"] != null) && (Request.Form["cardNum"] != ""))
            {
                cardNum = Request.Form["cardNum"].ToString();
            }
            if ((Request.Form["apprAmt"] != null) && (Request.Form["apprAmt"] != ""))
            {
                apprAmt = Request.Form["apprAmt"].ToString();
            }
            if ((Request.Form["resp"] != null) && (Request.Form["resp"] != ""))
            {
                resp = Request.Form["resp"].ToString();
            }
            if ((Request.Form["desc"] != null) && (Request.Form["desc"] != ""))
            {
                desc = Request.Form["desc"].ToString();
            }
            if (!IsPostBack)
            {
                Session["vitem_code"] = null;
                c_twall = ret.getTwalletByTransIDAdminID(txnref, adminID);
                c_app = ret.getApplicantByID(c_twall.applicantID);
                isw_fields = ret.getISWtransactionByTransactionID(txnref.Trim());
                if (c_twall.xid != null)
                {
                    Session["c_twall"] = c_twall;
                    lt_fdets = ret.getFee_detailsByTwalletID(c_twall.xid);
                    if (lt_fdets.Count > 0)
                    {
                        Session["lt_fdets"] = lt_fdets;
                    }
                    lt_hwall = ret.getHwalletByTransID(txnref);
                    int num = 1;
                    int num2 = 0;
                    XObjs.Registration  c_reg2 = (XObjs.Registration)Session["c_reg"];
                 vid = c_reg2.xid;
                    foreach (XObjs.Hwallet hwallet in lt_hwall)
                    {
                        XObjs.PaymentReciept item = new XObjs.PaymentReciept();
                        XObjs.Fee_list _list = new XObjs.Fee_list();
                        XObjs.Fee_details _details = new XObjs.Fee_details();
                        _details = ret.getFee_detailsByID(hwallet.fee_detailsID);
                        _list = ret.getFee_listByID(_details.fee_listID);
                        item.sn = num.ToString();
                        item.item_code = _list.item_code;

                        if (item.item_code == "AA1")
                        {

                            Session["vitem_code"] = "AA1";
                        }
                        item.item_desc = _list.xdesc;
                        item.init_amt = string.Format("{0:n}", Convert.ToInt32(_details.init_amt));
                        item.tech_amt = string.Format("{0:n}", Convert.ToInt32(_details.tech_amt));
                        item.qty = string.Format("{0:n}", 1);
                        int num3 = Convert.ToInt32(_details.init_amt) + Convert.ToInt32(_details.tech_amt);
                        item.tot_amount = string.Format("{0:n}", num3);
                        item.transID = hwallet.transID + "-" + hwallet.fee_detailsID + "-" + hwallet.xid;
                        num2 += num3;
                        Session["amt"] = num2;
                        total_amt = string.Format("{0:n}", num2 + Math.Round(Convert.ToDouble(isw_fields.isw_conv_fee), 2));
                        Session["total_amt"] = total_amt;
                        lt_pr.Add(item);
                        num++;
                    }
                }
                xstring.AppendLine("Transaction reference= " + txnref + " Payment reference= " + payRef + " Switching Bank Reference number= " + retRef + " card No= " + cardNum + " apprAmt= " + apprAmt);
                inputString = product_id.Trim() + txnref.Trim() + mackey.Trim();
                string headerValue = hash_value.GetGetSHA512String(inputString);

                isr = tx.myRedirect(check_trans_page.Trim() + "?productid=" + product_id.Trim() + "&transactionreference=" + txnref.Trim() + "&amount=" + isw_fields.amount.Trim(), "Hash", headerValue.Trim());

                if (((isr.ResponseCode != "") && (isr.ResponseCode != null)) && (isr.ResponseCode == "00"))
                {
                    err_desc = eh.getErrorDesc(isr.ResponseCode);
                    if (((err_desc != "") && (err_desc != null)) && (err_desc != "NA"))
                    {
                        isr.ResponseDescription = err_desc;
                    }
                    xstring.AppendLine("Sent Amount: " + isw_fields.amount + "\r\n Product ID: " + product_id + "\r\n Hash: " + headerValue + "\r\n Amount: " + isr.Amount + "\r\n CardNumber: " + isr.CardNumber + "\r\n MerchantReference: " + isr.MerchantReference + "\r\n PaymentReference: " + isr.PaymentReference + "\r\n RetrievalReferenceNumber: " + isr.RetrievalReferenceNumber + "\r\n LeadBankCbnCode: " + isr.LeadBankCbnCode + "\r\n TransactionDate: " + isr.TransactionDate + "\r\n ResponseCode: " + isr.ResponseCode + "\r\n ResponseDescription: " + isr.ResponseDescription + "\r\n Json Page: " + check_trans_page + "\r\n Form Response: " + resp + "\r\n Form Description: " + desc);
                    if (txnref != "")
                    {
                        if (Directory.Exists(Server.MapPath("~/") + "InterLogs/"))
                        {
                        docpath = Server.MapPath("~/") + "InterLogs/" + txnref + ".txt";
                        succ = x.WriteToFile(xstring.ToString(), docpath);
                        }
                    }

                    else
                    {
                        if (Directory.Exists(Server.MapPath("~/") + "InterLogs/"))
                        {
                            docpath = Server.MapPath("~/") + "InterLogs/xxx.txt";
                            succ = x.WriteToFile(xstring.ToString(), docpath);
                        }
                    }
                    succ = reg.updateInterSwitchRecords(txnref, payRef, retRef, isr.ResponseCode, isr.TransactionDate, isr.MerchantReference, isr.ResponseDescription,isr.PaymentReference);

                    if (isr.ResponseCode == "00" && (isr.PaymentReference!=null ||isr.PaymentReference!="") )
                    {
                        xpay_status = "1";
                    }
                    else
                    {
                        xpay_status = "3";
                    }
                    reg.updateTwalletPaymentStatus(txnref.Trim(), xpay_status.Trim());
                    if (succ != 0)
                    {
                        if (Session["vitem_code"] != null)
                        {

                            vitem_code = Convert.ToString(Session["vitem_code"]);
                            Retriever kp = new Retriever();
                           // int vmax = kp.getMaxSysId();
                           // vmax=vmax+1;
                           // String vsys_id = "CLD/RA/0" + vmax;

                            Registration dd = new Registration();
                           // dd.updateRegistrationSysID(vid, vsys_id);
                            dd.updateRegistrationSysID2(vid, "Paid");

                       XObjs.Registration ds=kp.getRegistrationByID(vid);
                       sendemail(ds);

                           // Session["cust_id"] = vsys_id;
                            if (Session["cust_id"] != null) {
                            cust_id = Session["cust_id"].ToString();

                            }

                        }

                        if (Session["onlineid"] != null)
                        {
                            Registration dd = new Registration();

                            string dpp = Convert.ToString(Session["onlineid"]);
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(dpp);
                            dd.updateTransID2(dpp.Trim(), txnref.Trim());

                            dd.updateHwallet2(txnref.Trim(), "Used");

                        }

                        if (Session["onlineid2"] != null)
                        {
                            Registration dd = new Registration();
                            string dpp = Convert.ToString(Session["onlineid2"]);
                            dd.updateTransID3(dpp, txnref.Trim());
                            dd.updateHwallet2(txnref.Trim(), "Used");

                        }

                        if (Session["onlineid3"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid3"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Name";

                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);

                        }

                        if (Session["onlineid4"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid4"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Address";

                            dd.updateHwallet2(txnref.Trim(), "Used");

                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);
                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid5"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid5"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Agent";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);
                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid6"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid6"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Rectification";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);
                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid7"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid7"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Assignment";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);
                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid8"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid8"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Assignment2";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);
                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid9"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid9"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "Renewal";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);
                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid10"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid10"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "TradeMarkAmendment";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);

                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        if (Session["onlineid12"] != null)
                        {
                            Registration dd = new Registration();
                            xname.Value = "Success";
                            xname2.Value = Convert.ToString(Session["onlineid12"]);
                            vamount.Value = isr.Amount;
                            vtransactionid.Value = isr.MerchantReference;
                            vtype.Value = "RegisteredUser";
                            dd.updateHwallet2(txnref.Trim(), "Used");
                            Retriever dp = new Retriever();
                            kkx = dp.getMarkInfo(xname2.Value);

                            //Registration dd = new Registration();
                            //string dpp = Convert.ToString(Session["onlineid2"]);
                            //dd.updateTransID3(dpp, txnref.Trim());

                        }

                        sendAlertHtml();
                    }
                }
                else if (((isr.ResponseCode != "") && (isr.ResponseCode != null)) && (isr.ResponseCode != "00"))
                {
                    err_desc = eh.getErrorDesc(isr.ResponseCode);
                    if (((err_desc != "") && (err_desc != null)) && (err_desc != "NA"))
                    {
                        isr.ResponseDescription = err_desc;
                    }
                    xstring.AppendLine("Sent Amount: " + isw_fields.amount + "\r\n Product ID: " + product_id + "\r\n Hash: " + headerValue + "\r\n Amount: " + isr.Amount + "\r\n CardNumber: " + isr.CardNumber + "\r\n MerchantReference: " + isr.MerchantReference + "\r\n PaymentReference: " + isr.PaymentReference + "\r\n RetrievalReferenceNumber: " + isr.RetrievalReferenceNumber + "\r\n LeadBankCbnCode: " + isr.LeadBankCbnCode + "\r\n TransactionDate: " + isr.TransactionDate + "\r\n ResponseCode: " + isr.ResponseCode + "\r\n ResponseDescription: " + isr.ResponseDescription + "\r\n Json Page: " + check_trans_page + "\r\n Form Response: " + resp + "\r\n Form Description: " + desc);
                    if (txnref != "")
                    {
                        docpath = Server.MapPath("~/") + "InterLogs/" + txnref + ".txt";
                        succ = x.WriteToFile(xstring.ToString(), docpath);
                    }
                    else
                    {
                        docpath = Server.MapPath("~/") + "InterLogs/xxx.txt";
                        succ = x.WriteToFile(xstring.ToString(), docpath);
                    }
                    succ = reg.updateInterSwitchRecords(txnref, payRef, retRef, isr.ResponseCode, isr.TransactionDate, isr.MerchantReference, isr.ResponseDescription,isr.PaymentReference);
                    if (isr.ResponseCode == "00" && (isr.PaymentReference != null || isr.PaymentReference != ""))
                    {
                        xpay_status = "1";
                    }
                    else
                    {
                        xpay_status = "3";
                    }
                    reg.updateTwalletPaymentStatus(txnref.Trim(), xpay_status.Trim());
                    if (succ != 0)
                    {
                        sendUnsuccAlertHtml();
                    }
                }
                else if ((isr.ResponseCode == "") || (isr.ResponseCode == null))
                {
                    string str2 = "None";
                    string str3 = "None";
                    xstring.AppendLine("Sent Amount: " + isw_fields.amount + "\r\n Product ID: " + product_id + "\r\n Hash: " + headerValue + "\r\n Amount: None\r\n CardNumber: None\r\n MerchantReference: None\r\n PaymentReference: None\r\n RetrievalReferenceNumber: None\r\n LeadBankCbnCode: None\r\n TransactionDate: None\r\n ResponseCode: " + str2 + "\r\n ResponseDescription: " + str3 + "\r\n Json Page: " + check_trans_page + "\r\n Form Response: " + resp + "\r\n Form Description: " + desc);
                    if (txnref != "")
                    {
                        docpath = Server.MapPath("~/") + "InterLogs/" + txnref + ".txt";
                        succ = x.WriteToFile(xstring.ToString(), docpath);
                    }
                    else
                    {
                        docpath = Server.MapPath("~/") + "InterLogs/xxx.txt";
                        succ = x.WriteToFile(xstring.ToString(), docpath);
                    }
                    xpay_status = "3";
                    reg.updateTwalletPaymentStatus(txnref, xpay_status);
                    if (desc == "")
                    {
                        isr.ResponseDescription = "Transaction Pending";
                    }
                    else
                    {
                        isr.ResponseDescription = desc;
                    }
                    if (resp == "")
                    {
                        isr.ResponseCode = "XXXX";
                    }
                    else
                    {
                        isr.ResponseCode = resp;
                    }
                    sendUnsuccAlertHtml();
                }
            }
        }
Esempio n. 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if ((this.Session["pwalletID"] != null) && (this.Session["pwalletID"].ToString() != ""))
     {
         this.adminID = this.Session["pwalletID"].ToString();
     }
     else
     {
         base.Response.Redirect(ConfigurationManager.AppSettings["agent_home"]);
     }
     if (this.Session["fullname"] != null)
     {
         this.fullname = this.Session["fullname"].ToString();
     }
     if (this.Session["email"] != null)
     {
         this.email = this.Session["email"].ToString();
     }
     if (this.Session["mobile"] != null)
     {
         this.mobile = this.Session["mobile"].ToString();
     }
     this.xstring = new StringBuilder();
     this.product_id = ConfigurationManager.AppSettings["pd_product_id_test"];
     this.mackey = ConfigurationManager.AppSettings["pd_mackey_test"];
     this.check_trans_page = ConfigurationManager.AppSettings["pd_get_trans_json_page_test"];
     if ((base.Request.QueryString["txnRef"] != null) && (base.Request.QueryString["txnRef"] != ""))
     {
         this.txnref = base.Request.QueryString["txnRef"].ToString();
         this.Session["transID"] = this.txnref;
     }
     if ((base.Request.QueryString["payRef"] != null) && (base.Request.QueryString["payRef"] != ""))
     {
         this.payRef = base.Request.QueryString["payRef"].ToString();
     }
     if ((base.Request.QueryString["retRef"] != null) && (base.Request.QueryString["retRef"] != ""))
     {
         this.retRef = base.Request.QueryString["retRef"].ToString();
     }
     if ((base.Request.QueryString["cardNum"] != null) && (base.Request.QueryString["cardNum"] != ""))
     {
         this.cardNum = base.Request.QueryString["cardNum"].ToString();
     }
     if ((base.Request.QueryString["apprAmt"] != null) && (base.Request.QueryString["apprAmt"] != ""))
     {
         this.apprAmt = base.Request.QueryString["apprAmt"].ToString();
     }
     if ((base.Request.QueryString["resp"] != null) && (base.Request.QueryString["resp"] != ""))
     {
         this.resp = base.Request.QueryString["resp"].ToString();
     }
     if ((base.Request.QueryString["desc"] != null) && (base.Request.QueryString["desc"] != ""))
     {
         this.desc = base.Request.QueryString["desc"].ToString();
     }
     if (!base.IsPostBack)
     {
         this.c_twall = this.ret.getTwalletByTransIDAdminID(this.txnref, this.adminID);
         this.c_app = this.ret.getApplicantByID(this.c_twall.applicantID);
         if (this.c_twall.xid != null)
         {
             this.Session["c_twall"] = this.c_twall;
             this.lt_fdets = this.ret.getFee_detailsByTwalletID(this.c_twall.xid);
             if (this.lt_fdets.Count > 0)
             {
                 this.Session["lt_fdets"] = this.lt_fdets;
             }
             this.lt_hwall = this.ret.getHwalletByTransID(this.txnref);
             int num = 1;
             int num2 = 0;
             foreach (XObjs.Hwallet hwallet in this.lt_hwall)
             {
                 XObjs.PaymentReciept item = new XObjs.PaymentReciept();
                 XObjs.Fee_list _list = new XObjs.Fee_list();
                 XObjs.Fee_details _details = new XObjs.Fee_details();
                 _details = this.ret.getFee_detailsByID(hwallet.fee_detailsID);
                 _list = this.ret.getFee_listByID(_details.fee_listID);
                 item.sn = num.ToString();
                 item.item_code = _list.item_code;
                 item.item_desc = _list.xdesc;
                 item.init_amt = string.Format("{0:n}", Convert.ToInt32(_details.init_amt));
                 item.tech_amt = string.Format("{0:n}", Convert.ToInt32(_details.tech_amt));
                 item.qty = string.Format("{0:n}", Convert.ToInt32(_details.xqty));
                 item.tot_amount = string.Format("{0:n}", Convert.ToInt32(_details.tot_amt));
                 item.transID = hwallet.transID + "-" + hwallet.fee_detailsID + "-" + hwallet.xid;
                 num2 += Convert.ToInt32(_details.tot_amt);
                 this.Session["amt"] = num2;
                 this.total_amt = string.Format("{0:n}", num2);
                 this.Session["total_amt"] = this.total_amt;
                 this.lt_pr.Add(item);
                 num++;
             }
         }
         this.isw_fields = this.ret.getISWtransactionByTransactionID(this.txnref);
         this.xstring.AppendLine("Transaction reference= " + this.txnref + " Payment reference= " + this.payRef + " Switching Bank Reference number= " + this.retRef + " card No= " + this.cardNum + " apprAmt= " + this.apprAmt);
         this.inputString = this.product_id + this.txnref + this.mackey;
         string headerValue = this.hash_value.GetGetSHA512String(this.inputString);
         this.isr = this.tx.myRedirect(this.check_trans_page + "?productid=" + this.product_id + "&transactionreference=" + this.txnref + "&amount=" + this.isw_fields.amount, "Hash", headerValue);
         if ((this.isr.ResponseCode != "") && (this.isr.ResponseCode != null))
         {
             this.err_desc = this.eh.getErrorDesc(this.isr.ResponseCode);
             if (((this.err_desc != "") && (this.err_desc != null)) && (this.err_desc != "NA"))
             {
                 this.isr.ResponseDescription = this.err_desc;
             }
             this.xstring.AppendLine("Sent Amount: " + this.isw_fields.amount + "\r\n Product ID: " + this.product_id + "\r\n Hash: " + headerValue + "\r\n Amount: " + this.isr.Amount + "\r\n CardNumber: " + this.isr.CardNumber + "\r\n MerchantReference: " + this.isr.MerchantReference + "\r\n PaymentReference: " + this.isr.PaymentReference + "\r\n RetrievalReferenceNumber: " + this.isr.RetrievalReferenceNumber + "\r\n LeadBankCbnCode: " + this.isr.LeadBankCbnCode + "\r\n TransactionDate: " + this.isr.TransactionDate + "\r\n ResponseCode: " + this.isr.ResponseCode + "\r\n ResponseDescription: " + this.isr.ResponseDescription + "\r\n Json Page: " + this.check_trans_page + "\r\n Form Response: " + this.resp + "\r\n Form Description: " + this.desc);
             if (this.txnref != "")
             {
                 this.docpath = base.Server.MapPath("~/") + "InterLogs/" + this.txnref + ".txt";
                 this.succ = this.x.WriteToFile(this.xstring.ToString(), this.docpath);
             }
             else
             {
                 this.docpath = base.Server.MapPath("~/") + "InterLogs/xxx.txt";
                 this.succ = this.x.WriteToFile(this.xstring.ToString(), this.docpath);
             }
             this.succ = this.reg.updateInterSwitchRecords(this.txnref, this.payRef, this.retRef, this.isr.ResponseCode, this.isr.TransactionDate, this.isr.MerchantReference, this.isr.ResponseDescription,isr.PaymentReference);
             if (this.isr.ResponseCode == "00")
             {
                 this.xpay_status = "1";
             }
             else
             {
                 this.xpay_status = "3";
             }
             if (this.succ != 0)
             {
                 this.sendAlertHtml();
             }
         }
         else
         {
             string str2 = "None";
             string str3 = "None";
             this.xstring.AppendLine("Sent Amount: " + this.isw_fields.amount + "\r\n Product ID: " + this.product_id + "\r\n Hash: " + headerValue + "\r\n Amount: None\r\n CardNumber: None\r\n MerchantReference: None\r\n PaymentReference: None\r\n RetrievalReferenceNumber: None\r\n LeadBankCbnCode: None\r\n TransactionDate: None\r\n ResponseCode: " + str2 + "\r\n ResponseDescription: " + str3 + "\r\n Json Page: " + this.check_trans_page + "\r\n Form Response: " + this.resp + "\r\n Form Description: " + this.desc);
             if (this.txnref != "")
             {
                 this.docpath = base.Server.MapPath("~/") + "InterLogs/" + this.txnref + ".txt";
                 this.succ = this.x.WriteToFile(this.xstring.ToString(), this.docpath);
             }
             else
             {
                 this.docpath = base.Server.MapPath("~/") + "InterLogs/xxx.txt";
                 this.succ = this.x.WriteToFile(this.xstring.ToString(), this.docpath);
             }
             this.xpay_status = "3";
             if (this.desc == "")
             {
                 this.isr.ResponseDescription = "Transaction Pending";
             }
             else
             {
                 this.isr.ResponseDescription = this.desc;
             }
             if (this.resp == "")
             {
                 this.isr.ResponseCode = "XXXX";
             }
             else
             {
                 this.isr.ResponseCode = this.resp;
             }
             this.sendAlertHtml();
         }
     }
 }