Example #1
0
        public string DoPayment(XObjs.InterSwitchPostFields ispf)
        {
            this.payment_page = ConfigurationManager.AppSettings["pd_payment_page"];
            RemotePost post = new RemotePost();

            post.Add("product_id", ispf.product_id);
            post.Add("pay_item_id", ispf.pay_item_id);
            post.Add("amount", ispf.amount);
            post.Add("currency", ispf.currency);
            post.Add("site_redirect_url", ispf.site_redirect_url);
            post.Add("txn_ref", ispf.txn_ref);
            post.Add("hash", ispf.hash);
            return(post.SendForm(this.payment_page, "POST").ToString());
        }
Example #2
0
        public int addInterSwitchRecords(XObjs.InterSwitchPostFields x)
        {
            string        str        = "";
            SqlConnection connection = new SqlConnection(hf.ConnectXpay());
            string        str3       = (str + "INSERT INTO InterSwitchPostFields (product_id,amount,isw_conv_fee,currency,site_redirect_url,txn_ref,hash,mackey,pay_item_id, ") + " site_name,cust_id,cust_id_desc,cust_name,resp_desc,pay_item_name,local_date_time,MerchantReference,TransactionDate,trans_status,pay_ref, " + " ret_ref,xreg_date,xvisible,xsync) ";

            str3 = str3 + " VALUES ('" + x.product_id + "','" + x.amount + "','" + x.isw_conv_fee + "','" + x.currency + "','" + x.site_redirect_url + "','" + x.txn_ref + "','" + x.hash + "','" + x.mackey + "', ";
            str3 = str3 + "'" + x.pay_item_id + "','" + x.site_name + "','" + x.cust_id + "','" + x.cust_id_desc + "','" + x.cust_name + "','" + x.resp_desc + "','" + x.pay_item_name + "', ";
            SqlCommand command = new SqlCommand(str3 + "'" + 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()", connection);

            connection.Open();
            int num = Convert.ToInt32(command.ExecuteScalar());

            connection.Close();
            return(num);
        }