public GetPrePayUrl ( string productId ) : string | ||
productId | string | |
Результат | string |
protected void Page_Load(object sender, EventArgs e) { Log.Info(this.GetType().ToString(), "page load"); NativePay nativePay = new NativePay(); //生成扫码支付模式一url string url1 = nativePay.GetPrePayUrl("123456789"); //生成扫码支付模式二url string url2 = nativePay.GetPayUrl("123456789"); //将url生成二维码图片 if (!url1.Contains("weixin")) { Response.Write("<span style='color:#FF0000;font-size:20px'>" + url1 + "</span>"); } else { Image1.ImageUrl = "MakeQRCode.aspx?data=" + HttpUtility.UrlEncode(url1); } if (!url2.Contains("weixin")) { Response.Write("<span style='color:#FF0000;font-size:20px'>" + url2 + "</span>"); } else { Image2.ImageUrl = "MakeQRCode.aspx?data=" + HttpUtility.UrlEncode(url2); } }
protected void Page_Load(object sender, EventArgs e) { Log.Info(this.GetType().ToString(), "page load"); NativePay nativePay = new NativePay(); //生成扫码支付模式一url string url1 = nativePay.GetPrePayUrl("123456789"); //生成扫码支付模式二url string url2 = nativePay.GetPayUrl("123456789"); //将url生成二维码图片 Image1.ImageUrl = "MakeQRCode.aspx?data=" + HttpUtility.UrlEncode(url1); Image2.ImageUrl = "MakeQRCode.aspx?data=" + HttpUtility.UrlEncode(url2); }
protected void Page_Load(object sender, EventArgs e) { Log.Info(this.GetType().ToString(), "page load"); NativePay nativePay = new NativePay(); //生成扫码支付模式一url string url1 = nativePay.GetPrePayUrl("123456789"); //生成扫码支付模式二url string url2 = nativePay.GetPayUrl("123456789"); //将url生成二维码图片 Image1.ImageUrl = "MakeQRCode.aspx?data=" + HttpUtility.UrlEncode(url1); Image2.ImageUrl = "MakeQRCode.aspx?data=" + HttpUtility.UrlEncode(url2); }