public int addPwallet(Ipong.Classes.XObjs.Pwallet x) { string connectionString = this.ConnectXpay(); SqlConnection connection = new SqlConnection(connectionString); SqlCommand command = new SqlCommand("INSERT INTO pwallet (xemail,xmobile,xmemberID,xmembertype,xpass,reg_date) VALUES ('" + x.xemail + "','" + x.xmobile + "','" + x.xmemberID + "','" + x.xmembertype + "','" + x.xpass + "','" + x.reg_date + "') SELECT SCOPE_IDENTITY()", connection); connection.Open(); int succ = Convert.ToInt32(command.ExecuteScalar()); connection.Close(); return succ; }
public int addImpXpayAgent(Ipong.Classes.XObjs.XAgent x) { string connectionString = this.ConnectXpay(); SqlConnection connection = new SqlConnection(connectionString); SqlCommand command = new SqlCommand("INSERT INTO xagent (addressID,sys_ID,xname,cname,xpassword,nationality,xreg_date,xvisible,xsync) VALUES ('" + x.addressID + "','" + x.sys_ID + "','" + x.xname + "','" + x.cname + "','" + x.xpassword + "','" + x.nationality + "','" + x.xreg_date + "','" + x.xvisible + "','" + x.xsync + "') SELECT SCOPE_IDENTITY()", connection); connection.Open(); int succ = Convert.ToInt32(command.ExecuteScalar()); connection.Close(); return succ; }
public int addHwallet(Ipong.Classes.XObjs.Hwallet x) { string connectionString = this.ConnectXpay(); SqlConnection connection = new SqlConnection(connectionString); SqlCommand command = new SqlCommand("INSERT INTO hwallet (transID,fee_detailsID,used_status,xreg_date,used_date,product_title) VALUES ('" + x.transID + "','" + x.fee_detailsID + "','" + x.used_status + "','" + x.xreg_date + "','" + x.used_date + "','" + x.product_title + "') SELECT SCOPE_IDENTITY()", connection); connection.Open(); int succ = Convert.ToInt32(command.ExecuteScalar()); connection.Close(); return succ; }
public int addFee_details(Ipong.Classes.XObjs.Fee_details x) { string connectionString = this.ConnectXpay(); SqlConnection connection = new SqlConnection(connectionString); SqlCommand command = new SqlCommand("INSERT INTO fee_details (fee_listID,twalletID,xqty,xused,xlogstaff,tot_amt,init_amt,tech_amt,xreg_date,xvisible,xsync) VALUES ('" + x.fee_listID + "','" + x.twalletID + "','" + x.xqty + "','" + x.xused + "','" + x.xlogstaff + "','" + x.tot_amt + "','" + x.init_amt + "','" + x.tech_amt + "','" + x.xreg_date + "','" + x.xvisible + "','" + x.xsync + "') SELECT SCOPE_IDENTITY()", connection); connection.Open(); int succ = Convert.ToInt32(command.ExecuteScalar()); connection.Close(); return succ; }
public string DoPayment(Ipong.Classes.XObjs.InterSwitchPostFields ispf) { payment_page = ConfigurationManager.AppSettings["pd_payment_page"]; Ipong.Classes.RemotePost rp = new Ipong.Classes.RemotePost(); rp.Add("product_id", ispf.product_id); rp.Add("pay_item_id", ispf.pay_item_id); rp.Add("amount", ispf.amount); rp.Add("currency", ispf.currency); rp.Add("site_redirect_url", ispf.site_redirect_url); rp.Add("txn_ref", ispf.txn_ref); rp.Add("hash", ispf.hash); string succ = rp.SendForm(payment_page, "POST"); return succ.ToString(); }
public int addInterSwitchRecords(Ipong.Classes.XObjs.InterSwitchPostFields x) { string command_text = ""; string connectionString = this.ConnectXpay(); SqlConnection connection = new SqlConnection(connectionString); command_text += "INSERT INTO InterSwitchPostFields (product_id,amount,isw_conv_fee,currency,site_redirect_url,txn_ref,hash,mackey,pay_item_id, "; command_text += " site_name,cust_id,cust_id_desc,cust_name,resp_desc,pay_item_name,local_date_time,MerchantReference,TransactionDate,trans_status,pay_ref, "; command_text += " ret_ref,xreg_date,xvisible,xsync) "; command_text += " VALUES ('" + x.product_id + "','" + x.amount + "','" + x.isw_conv_fee + "','" + x.currency + "','" + x.site_redirect_url + "','" + x.txn_ref + "','" + x.hash + "','" + x.mackey + "', "; command_text += "'" + x.pay_item_id + "','" + x.site_name + "','" + x.cust_id + "','" + x.cust_id_desc + "','" + x.cust_name + "','" + x.resp_desc + "','" + x.pay_item_name + "', "; command_text += "'" + x.local_date_time + "','" + x.TransactionDate + "','" + x.MerchantReference + "','" + x.trans_status + "','" + x.pay_ref + "','" + x.ret_ref + "','" + x.xreg_date + "','" + x.xvisible + "','" + x.xsync + "') SELECT SCOPE_IDENTITY()"; SqlCommand command = new SqlCommand(command_text, connection); connection.Open(); int succ = Convert.ToInt32(command.ExecuteScalar()); connection.Close(); return succ; }
public int addXpayMember(Ipong.Classes.XObjs.XMember x) { string sys_ID = "0"; string connectionString = this.ConnectXpay(); SqlConnection connection = new SqlConnection(connectionString); SqlCommand command = new SqlCommand("INSERT INTO xmember (addressID,sys_ID,xname,cname,xpassword,nationality,xreg_date,xvisible,xsync) VALUES ('" + x.addressID + "','" + x.sys_ID + "','" + x.xname + "','" + x.cname + "','" + x.xpassword + "','" + x.nationality + "','" + x.xreg_date + "','" + x.xvisible + "','" + x.xsync + "') SELECT SCOPE_IDENTITY()", connection); connection.Open(); int succ = Convert.ToInt32(command.ExecuteScalar()); connection.Close(); if (succ > 0) { sys_ID = "CLD/RC/" + succ.ToString().PadLeft(5, '0'); updateXpayMember(succ.ToString(), sys_ID); } return succ; }
public int addXpayAddress(Ipong.Classes.XObjs.Address x) { string connectionString = this.ConnectXpay(); SqlConnection connection = new SqlConnection(connectionString); SqlCommand command = new SqlCommand("INSERT INTO address (countryID,stateID,lgaID,city,street,zip,telephone1,telephone2,email1,email2,log_staff,reg_date,visible,xsync) VALUES ('" + x.countryID + "','" + x.stateID + "','" + x.lgaID + "','" + x.city + "','" + x.street + "','" + x.zip + "','" + x.telephone1 + "','" + x.telephone2 + "','" + x.email1 + "','" + x.email2 + "','" + x.log_staff + "','" + x.reg_date + "','" + x.visible + "','" + x.xsync + "') SELECT SCOPE_IDENTITY()", connection); connection.Open(); int succ = Convert.ToInt32(command.ExecuteScalar()); connection.Close(); return succ; }