h5微信支付在獲取openid頁面需要傳引數進來,但是在獲取openid后,重繪頁面,引數丟失了,這個怎么處理。就差這一步了,這一步成功,整 個支付就算完成了。
//獲取當前用戶的OpenId,如果可以通過系統獲取用戶Openid就不用呼叫該函式
this.GetUserOpenId();
this.lblOpenId.Text = this.UserOpenId;
LogUtil.WriteLog("Send 頁面 pdf:" + Request.QueryString["pdf"].ToString());
string pdf = "";
string id = "";
string qx = "";
string pid = "";
if (Request.QueryString["pdf"] != null)
pdf = Request.QueryString["pdf"].ToString();
if (Request.QueryString["id"] != null)
id = Request.QueryString["id"].ToString();
if (Request.QueryString["qx"] != null)
qx = Request.QueryString["qx"].ToString();
if (Request.QueryString["pid"] != null)
pid = Request.QueryString["pid"].ToString();
//this.GetUserOpenId();
//this.lblOpenId.Text = this.UserOpenId;
Response.Write(pdf + id + qx + pid + "aa");
Response.End();
//設定支付資料
PayModel model = new PayModel();
model.OrderSN = this.txtOrderSN.Text;
model.TotalFee = int.Parse(this.txtPrice.Text);
model.Body = pdf;// this.txtBody.Text;
model.Attach = this.txtOther.Text; //不能有中文
model.OpenId = "";// Request.QueryString["openid"].ToString();// "o2lm6uMVUTvmeyMzhBRvAFE465V8";// this.lblOpenId.Text;
model.pdf = pdf;
model.id = id;
model.qx = qx;
model.pid = pid;
//string pdf = Request.QueryString["pdf"].ToString();
//跳轉到 WeiPay.aspx 頁面,請設定函式中WeiPay.aspx的頁面地址
this.Response.Redirect(model.ToString());
uj5u.com熱心網友回復:
實際是頁面傳參的問題,引數不丟失,問題也就解決了。uj5u.com熱心網友回復:

這樣支付是沒問題的,但是傳參進來,獲取openid的時候要重繪頁面,引數丟失,怎樣解決
轉載請註明出處,本文鏈接:https://www.uj5u.com/yidong/50410.html
標籤:微信支付
上一篇:Qt為什么還要用VS
