string TYPE = ""; // 自定义操作类型 ///// <summary> ///// 获取请求参数信息 ///// </summary> //private String getParam(String LogName = "") //{ // TYPE = Request["TYPE"]; // String Url = Request.Url.ToString(); // String param = ""; // if (Url.Contains("?")) // { // param = Url.Substring(Url.IndexOf("?") + 1); // 获取参数信息 // if (LogName.Equals("")) LogName = this.GetType().Name; // LogTool log = new LogTool(LogName); // 记录至log中 // log.WriteLine(param); // } // return param; //} /// <summary> /// 接口使用说明信息 /// </summary> private void NoteInfo() { String url = "http://" + Request.Params.Get("HTTP_HOST") + "/" + this.GetType().Name.Replace("_", "/").Replace("/aspx", ".aspx") + "?"; StringBuilder builder = new StringBuilder(); builder.AppendLine("接口使用说明:"); builder.AppendLine("支付类型参数:PayType = Ali、Wechat"); builder.AppendLine(""); builder.AppendLine("添加、修改qrTab:\t" + url + "TYPE=SetQrTable&ID=100&TabName=qrTab100"); builder.AppendLine("向qrTab添加数据项:\t" + url + "TYPE=AddToQrTable&TabName=qrTab100&price=0.1&qrLink=http://www.baidu.com"); builder.AppendLine("修改qrTab中的数据:\t" + url + "TYPE=UpdateQrTable&TabName=qrTab100&ID=100&price=0.1&qrLink=http://www.w3school.com.cn&orderId=100&isUsing=True"); builder.AppendLine("删除表中指定值对应行:\t" + url + "TYPE=DeletInTable&TabName=qrTab100&KeyValue=104&KeyName=ID"); builder.AppendLine("删除指定的数据表:\t" + url + "TYPE=DeletTable&TabName=qrTab110"); builder.AppendLine(""); builder.AppendLine("请求获取可用的qrLink:\t" + url + "TYPE=GetQrLink&price=2&orderId=1001"); builder.AppendLine("通知指定price回调完成:\t" + url + "TYPE=PriceFinish&phoneId=681190477515911&price=2"); Response.Write(ScTool.Pre(builder.ToString())); //print("接口使用说明:"); //print(""); //print("添加、修改qrTab:\t" + url + "TYPE=SetQrTable&ID=100&TabName=qrTab100"); //print("向qrTab添加数据项:\t" + url + "TYPE=AddToQrTable&TabName=qrTab100&price=0.1&qrLink=http://www.baidu.com"); //print("在qrTab中修改数据:\t" + url + "TYPE=UpdateQrTable&TabName=qrTab100&ID=100&price=0.1&qrLink=http://www.w3school.com.cn&orderId=100&isUsing=True"); //print("删除表中指定值所有行:\t" + url + "TYPE=DeletInTable&TabName=qrTab100&KeyValue=104&KeyName=ID"); }
/// <summary> /// 接口使用说明信息 /// QrUrl, string HbUrl, string Tittle, string ext /// </summary> private void NoteInfo() { String url = "http://" + Request.Params.Get("HTTP_HOST") + "/" + this.GetType().Name.Replace("_", "/").Replace("/aspx", ".aspx") + "?"; StringBuilder builder = new StringBuilder(); builder.AppendLine("接口使用说明:"); builder.AppendLine(""); builder.AppendLine("添加:\t" + url + "TYPE=Add&showRectangle=true&showIconUrl=1&showNoteInfo=2&showButtonInfo=3&showPicUrl=4&ext="); builder.AppendLine("删除:\t" + url + "TYPE=Delet&ID=1005"); builder.AppendLine("修改:\t" + url + "TYPE=Update&ID=1005&showRectangle=true&showIconUrl=1&showNoteInfo=2&showButtonInfo=3&showPicUrl=4&ext=5"); builder.AppendLine(""); Response.Write(ScTool.Pre(builder.ToString())); }
/// <summary> /// 接口使用说明信息 /// </summary> private void NoteInfo() { String url = "http://" + Request.Params.Get("HTTP_HOST") + "/" + this.GetType().Name.Replace("_", "/").Replace("/aspx", ".aspx") + "?"; StringBuilder builder = new StringBuilder(); builder.AppendLine("查询已支付的用户MachineCode信息"); builder.AppendLine("接口使用说明:"); builder.AppendLine(""); builder.AppendLine("查询是否存在:\t" + url + "TYPE=Check&machinCode=XRUM-LYKS-4R2P-QP6H&soft=可为空"); builder.AppendLine("添加:\t" + url + "TYPE=Add&machinCode=XRUM-LYKS-4R2P-QP6H&soft=easyIcon&ext=拓展参数"); builder.AppendLine(""); Response.Write(ScTool.Pre(builder.ToString())); }
/// <summary> /// 接口使用说明信息 /// QrUrl, string HbUrl, string Tittle, string ext /// </summary> private void NoteInfo() { String url = "http://" + Request.Params.Get("HTTP_HOST") + "/" + this.GetType().Name.Replace("_", "/").Replace("/aspx", ".aspx") + "?"; StringBuilder builder = new StringBuilder(); builder.AppendLine("接口使用说明:"); builder.AppendLine(""); builder.AppendLine("添加:\t" + url + "TYPE=Add&UserAgent=XXXX&ext="); builder.AppendLine("删除:\t" + url + "TYPE=Delet&ID=1005"); builder.AppendLine("修改:\t" + url + "TYPE=Update&ID=1005&UserAgent=XXXX&ext=xxx&count=1"); builder.AppendLine("计数:\t" + url + "TYPE=CountAdd&ID=1005"); builder.AppendLine(""); Response.Write(ScTool.Pre(builder.ToString())); }
/// <summary> /// 接口使用说明信息 /// </summary> private void NoteInfo() { String url = "http://" + Request.Params.Get("HTTP_HOST") + "/" + this.GetType().Name.Replace("_", "/").Replace("/aspx", ".aspx") + "?"; StringBuilder builder = new StringBuilder(); builder.AppendLine("软件信息接口,使用说明:"); builder.AppendLine(""); builder.AppendLine("添加:\t" + url + "TYPE=Add&softName=easyIcon&price=1&linkUrl=http://scimence.oschina.io/easyicon/&recomondUrl=推荐链接&ext=拓展参数"); builder.AppendLine("修改:\t" + url + "TYPE=Update&ID=100&softName=easyIcon软件&price=1&linkUrl=http://scimence.oschina.io/easyicon/&recomondUrl=推荐链接&ext=拓展参数"); builder.AppendLine("删除:\t" + url + "TYPE=Delet&ID=101"); builder.AppendLine("查询:\t" + url + "TYPE=Select&softName=easyIcon&key=price"); builder.AppendLine(""); Response.Write(ScTool.Pre(builder.ToString())); }
/// <summary> /// 接口使用说明信息 /// QrUrl, string HbUrl, string Tittle, string ext /// </summary> private void NoteInfo() { String url = "http://" + Request.Params.Get("HTTP_HOST") + "/" + this.GetType().Name.Replace("_", "/").Replace("/aspx", ".aspx") + "?"; StringBuilder builder = new StringBuilder(); builder.AppendLine("接口使用说明:"); builder.AppendLine(""); builder.AppendLine("添加:\t" + url + "TYPE=Add&nickname=nickname1&avatar=avatar1&ext="); builder.AppendLine("删除:\t" + url + "TYPE=Delet&ID=1005"); builder.AppendLine("修改:\t" + url + "TYPE=Update&ID=1005&nickname=nickname2&avatar=avatar2&ext=xxx&count=1"); builder.AppendLine("计数:\t" + url + "TYPE=CountAdd&ID=1005"); builder.AppendLine("https://tfs.alipayobjects.com/images/partner/"); builder.AppendLine(""); Response.Write(ScTool.Pre(builder.ToString())); }
/// <summary> /// 接口使用说明信息 /// QrUrl, string HbUrl, string Tittle, string ext /// </summary> private void NoteInfo() { String url = "http://" + Request.Params.Get("HTTP_HOST") + "/" + this.GetType().Name.Replace("_", "/").Replace("/aspx", ".aspx") + "?"; StringBuilder builder = new StringBuilder(); builder.AppendLine("接口使用说明:"); builder.AppendLine(""); builder.AppendLine("添加:\t" + url + "TYPE=Add&QrUrl=https://www.baidu.com&HbUrl=https://fanyi.baidu.com&Tittle=第8号当铺&ext="); builder.AppendLine("删除:\t" + url + "TYPE=Delet&ID=1005"); builder.AppendLine("修改:\t" + url + "TYPE=Update&ID=1005&QrUrl=https://www.baidu.com2&HbUrl=https://fanyi.baidu.com2&Tittle=第9号当铺&ext=&count=1"); builder.AppendLine("查询:\t" + url + "TYPE=Get&ID=1005&KeyName=QrUrl"); builder.AppendLine("(可查询表中的任意列)"); builder.AppendLine("计数:\t" + url + "TYPE=CountAdd&ID=1005"); builder.AppendLine("链接:\t" + "http://" + Request.Params.Get("HTTP_HOST") + "/" + "tools/QRTool/QR_HB/100.png"); builder.AppendLine(""); Response.Write(ScTool.Pre(builder.ToString())); }
/// <summary> /// 接口使用说明信息 /// </summary> private void NoteInfo() { String url = "http://" + Request.Params.Get("HTTP_HOST") + "/" + this.GetType().Name.Replace("_", "/").Replace("/aspx", ".aspx") + "?"; StringBuilder builder = new StringBuilder(); builder.AppendLine("商品信息接口,使用说明:"); builder.AppendLine(""); builder.AppendLine("设置付费资源,网址模式:\t" + url + "TYPE=StaticIp"); builder.AppendLine(""); builder.AppendLine("添加:\t" + url + "TYPE=Add&name=资源xxx&price=1&author=您的支付宝账号&data=资源解压密码xxx&ext=拓展参数"); builder.AppendLine("修改:\t" + url + "TYPE=Update&ID=100&name=资源xx1&author=scimence&price=1&data=密码321&ext="); builder.AppendLine("删除:\t" + url + "TYPE=Delet&ID=101"); builder.AppendLine("查询:\t" + url + "TYPE=Select&ID=100&key=data"); builder.AppendLine(""); builder.AppendLine("待支付、显示密码:\t" + url + "ID=100"); builder.AppendLine(""); Response.Write(ScTool.Pre(builder.ToString())); }
/// <summary> /// 接口使用说明信息 /// </summary> private void NoteInfo() { String author = "author(" + UserAccount + ")author";// ";备注信息"; String url = "http://" + Request.Params.Get("HTTP_HOST") + "/" + this.GetType().Name.Replace("_", "/").Replace("/aspx", ".aspx") + "?"; StringBuilder builder = new StringBuilder(); builder.AppendLine("接口使用说明:"); builder.AppendLine("支付类型参数:PayType = Ali、Wechat"); builder.AppendLine(""); builder.AppendLine("请求支付,不获取订单号:\t" + url + "machinCode=机器码1&soft=easyIcon软件&product=注册0.1元&money=0.1&ext=" + author + ";其它信息"); builder.AppendLine("查询订单支付结果:\t" + url + "TYPE=OrderResult&P=请求支付的参数信息"); builder.AppendLine(""); builder.AppendLine("预下单,获取订单号:\t" + url + "TYPE=PreOrder&machinCode=机器码1&soft=easyIcon软件&product=注册0.1元&money=0.1&ext=" + author + ";其它信息"); builder.AppendLine("显示,预下单二维码:\t" + url + "TYPE=ShowPreOrder&preOrderId=100"); builder.AppendLine("查询订单支付结果:\t" + url + "TYPE=OrderResult&preOrderId=100"); builder.AppendLine("查询订单支付结果,不加密:\t" + url + "TYPE=OrderResultX&preOrderId=100"); builder.AppendLine("查询订单支付结果,不加密:\t" + url + "TYPE=OrderResultX&machinCode=机器码1&soft=可为空"); Response.Write(ScTool.Pre(builder.ToString())); }
/// <summary> /// 接口使用说明信息 /// </summary> private void NoteInfo() { String author = "author(" + UserAccount + ")author";// ";备注信息"; String url = "http://" + Request.Params.Get("HTTP_HOST") + "/" + this.GetType().Name.Replace("_", "/").Replace("/aspx", ".aspx") + "?"; StringBuilder builder = new StringBuilder(); builder.AppendLine("接口使用说明:"); builder.AppendLine("支付类型参数:PayType = Ali、Wechat"); builder.AppendLine(""); builder.AppendLine("创建订单示例:\t" + url + "PayType=Ali&machinCode=机器码1&soft=easyIcon软件&product=注册0.1元&money=0.1&ext=" + author + "&preOrderId="); builder.AppendLine("查询订单信息:\t" + url + "ShowOrder=Ali"); if (UserType == 2) { builder.AppendLine("指定订单ID成功:\t" + url + "ShowOrder=Ali" + "&OrderSuccess=100"); } builder.AppendLine("统计成功金额,是否清空:\t" + url + "PayType=Ali" + "&MoneyAllClear=false"); Response.Write(ScTool.Pre(builder.ToString())); }
/// <summary> /// 接口使用说明信息 /// </summary> private void NoteInfo() { String url = "http://" + Request.Params.Get("HTTP_HOST") + "/" + this.GetType().Name.Replace("_", "/").Replace("/aspx", ".aspx") + "?"; StringBuilder builder = new StringBuilder(); builder.AppendLine("用户商品信息统计接口,使用说明:"); builder.AppendLine(""); builder.AppendLine("添加:\t" + url + "TYPE=Add&author=账号&reward=0&sum=0"); builder.AppendLine("修改:\t" + url + "TYPE=Update&ID=100&author=scimence&reward=1&sum=0"); builder.AppendLine("删除:\t" + url + "TYPE=Delet&ID=101"); builder.AppendLine("查询:\t" + url + "TYPE=Select&ID=100&key=author"); builder.AppendLine(""); builder.AppendLine("载入所有用户收益:\t" + url + "TYPE=Reward&author=ALL"); builder.AppendLine(""); builder.AppendLine("载入指定用户收益:\t" + url + "TYPE=Reward&author=账号"); builder.AppendLine("清除指定用户当前收益:\t" + url + "TYPE=RewardClear&author=账号"); builder.AppendLine(""); Response.Write(ScTool.Pre(builder.ToString())); }
/// <summary> /// 接口使用说明信息 /// </summary> private void NoteInfo() { String url = "http://" + Request.Params.Get("HTTP_HOST") + "/" + this.GetType().Name.Replace("_", "/").Replace("/aspx", ".aspx") + "?"; StringBuilder builder = new StringBuilder(); builder.AppendLine("记录和查询用户序列号信息"); builder.AppendLine("接口使用说明:"); builder.AppendLine(""); builder.AppendLine("查询已注册序列号:\t" + url + "TYPE=GetRegSerial&machinCode=XRUM-LYKS-4R2P-QP6H&soft=easyIcon&computerName=计算机名称&userName=用户名称&ext=拓展参数&counter=true"); builder.AppendLine("修改表中的数据:\t" + url + "TYPE=UpdateSerial&ID=10001&machinCode=XRUM-LYKS-4R2P-QP6H&soft=easyIcon&computerName=计算机名称&userName=用户名称&ext=拓展参数&startTimes=1&onlineSerial=注册码信息&msg=消息"); builder.AppendLine("查询指定列数据:\t" + url + "TYPE=GetValue&KEY=startTimes&machinCode=P7WK-R306-A91B-059E&soft=easyIcon"); builder.AppendLine(""); Response.Write(ScTool.Pre(builder.ToString())); //print("接口使用说明:"); //print(""); //print("添加、修改qrTab:\t" + url + "TYPE=SetQrTable&ID=100&TabName=qrTab100"); //print("向qrTab添加数据项:\t" + url + "TYPE=AddToQrTable&TabName=qrTab100&price=0.1&qrLink=http://www.baidu.com"); //print("在qrTab中修改数据:\t" + url + "TYPE=UpdateQrTable&TabName=qrTab100&ID=100&price=0.1&qrLink=http://www.w3school.com.cn&orderId=100&isUsing=True"); //print("删除表中指定值所有行:\t" + url + "TYPE=DeletInTable&TabName=qrTab100&KeyValue=104&KeyName=ID"); }
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { ScTool.RecordUserAgent(Request); // 记录客户端信息 } string agent = Request.Params.Get("HTTP_USER_AGENT"); Response.Write(ScTool.Pre("HTTP_USER_AGENT -> \r\n" + agent)); int loop1, loop2; NameValueCollection coll; //// Load Header collection into NameValueCollection object. ////coll = Request.Headers; coll = Request.Params; // Put the names of all keys into a string array. String[] arr1 = coll.AllKeys; for (loop1 = 0; loop1 < arr1.Length; loop1++) { Response.Write(ScTool.Pre("Key: " + arr1[loop1] + " -> ")); // Get all values under this key. String[] arr2 = coll.GetValues(arr1[loop1]); for (loop2 = 0; loop2 < arr2.Length; loop2++) { Response.Write(ScTool.Pre("Value " + loop2 + ": " + Server.HtmlEncode(arr2[loop2]))); } } //Label1.Text = Request.QueryString["param"]; //Label1.Text = Request.Params.Get("HTTP_HOST"); //Label1.Text = Request.Url.ToString(); //Label1.Text = Request.RawUrl; //Label1.Text = Request.Url.DnsSafeHost; }
public override void Load(object sender, EventArgs e) { if (UserType == 0) { Response.Redirect("../PayFor/UserLogin.aspx"); } else if (UserType == 1) { Response.Redirect("../PayFor/SDK.aspx"); } if (!Page.IsPostBack) { ScTool.RecordUserAgent(Request); // 记录客户端信息 } string type = Request["PayType"]; if (type != null && !type.Equals("")) { PayType = type; } DB = new DataBase(ScTool.DBName(PayType), ScTool.UserName, ScTool.Password); //getParam(); //获取参数记录log信息 TYPE = Request["TYPE"]; if (TYPE != null) { if (TYPE.Equals("SetQrTable")) { SetQrTable(Request["ID"], Request["TabName"]); } else if (TYPE.Equals("AddToQrTable")) { AddToQrTable(DB, Request["TabName"], Request["price"], Request["qrLink"]); } else if (TYPE.Equals("UpdateQrTable")) { UpdateQrTable(Request["TabName"], Request["ID"], Request["price"], Request["qrLink"], Request["orderId"], Request["isUsing"]); } else if (TYPE.Equals("DeletInTable")) { DeletInTable(Request["TabName"], Request["KeyValue"], Request["KeyName"]); } else if (TYPE.Equals("DeletTable")) { DeletTable(Request["TabName"]); } else if (TYPE.Equals("GetQrLink")) { string link = GetQrLink(DB, Request["price"], Request["orderId"]); Response.Write(link); return; } else if (TYPE.Equals("PriceFinish")) { string orderId = PriceFinish(DB, Request["phoneId"], Request["price"]); Response.Write(orderId); return; } } NoteInfo(); if (!DB.ExistTab(CASHER)) { Response.Write(ScTool.Pre("数据表" + CASHER + "不存在!请使用NotificationSender创建")); } else { ScTool.showTable(this.Controls, DB, CASHER); List <string> qrTableList = DB.ColumnList(CASHER, "qrTabName"); foreach (string table in qrTableList) { if (!table.Equals("")) { ScTool.showTable(this.Controls, DB, table, "", false); } } //Table table = DB.ExecuteTable("select * from Cahsier"); //this.Controls.Add(table); //PlaceHolder_Tab.Controls.Add(table); } }
string TAB = ScTool.ORDER; // 订单表名称 ///// <summary> ///// 判断ext中是否含有开发者帐号信息 ///// </summary> ///// <returns></returns> //private bool ContainsAuthorInfo() //{ // String orderExt = Request["ext"]; // bool ContainsAuthor = (orderExt != null && orderExt.Contains("author(" + UserAccount + ")")); // if (!ContainsAuthor) Response.Write("创建订单时需包含开发者信息" + "ext=author(" + UserAccount + ")author"); // return ContainsAuthor; //} /// <summary> /// 载入后执行参数对应的sql请求 /// </summary> public override void Load(object sender, EventArgs e) { if (UserType == 0 && (param.Equals("") || (param.Contains("ShowOrder") && !param.Contains("OrderSuccess")))) { Response.Redirect("../PayFor/UserLogin.aspx"); } Dictionary <string, string> staticPramsDic = null; // 静态参数字典 // 若存在静态参数,则使用静态参数 if (!StaticParam.Equals("")) { staticPramsDic = ScTool.ToParamsDic(StaticParam); StaticParam = ""; } //PayType = ScTool.PayTypeAli; string type = Request["PayType"]; if (staticPramsDic != null && staticPramsDic.ContainsKey("PayType")) { type = staticPramsDic["PayType"]; } if (type != null && !type.Equals("")) { PayType = type; } if (PayType.Equals("")) { if (staticPramsDic == null) { NoteInfo(); // 从Pay.aspx Transfer过来,不显示接口说明信息 } else { Response.Write("扫码客户端类型未知,创建订单失败!<br/>请使用支付宝或微信扫码支付"); } // 显示订单信息 string showOrder = Request["ShowOrder"]; if (staticPramsDic != null && staticPramsDic.ContainsKey("ShowOrder")) { showOrder = staticPramsDic["ShowOrder"]; } if (showOrder != null && !showOrder.Equals("")) { if (showOrder.Equals(ScTool.PayTypeAli) || showOrder.Equals(ScTool.PayTypeWechat)) { DB = new DataBase(ScTool.DBName(showOrder), ScTool.UserName, ScTool.Password); // 修改指定的订单为支付成功 string orderId = Request["OrderSuccess"]; if (staticPramsDic != null && staticPramsDic.ContainsKey("OrderSuccess")) { orderId = staticPramsDic["OrderSuccess"]; } if (orderId != null && !orderId.Equals("")) { string result = "fail"; if (UserType == 2) { result = OrderSuccess(DB, orderId); } //else if (UserType == 1) result = OrderSuccess(DB, orderId, UserAccount); else if (UserType == 1) { result = "false no allowed!"; } Response.Write(ScTool.Pre("OrderSuccess->" + orderId + ": " + result)); } // 显示指定类型的订单信息 if (UserType == 2) { ScTool.showTable(this.Controls, DB, ScTool.ORDER); } else if (UserType == 1) { ScTool.showTable(this.Controls, DB, ScTool.ORDER, "where ext like '%" + "author(" + UserAccount + ")" + "%' "); } } } } else { //if (!ContainsAuthorInfo()) return; // 连接指定的数据库,若不存在则创建 DB = new DataBase(ScTool.DBName(PayType), ScTool.UserName, ScTool.Password); //DB.DeletTable(ScTool.ORDER); confirmOrderTab(); //统计金额总数,指定是否清空 string ParamClear = Request["MoneyAllClear"]; if (ParamClear != null) { bool clear = ParamClear.Trim().ToLower().Equals("true"); if (clear) { string result = MoneyAllClear(DB, UserAccount); Response.Write(result); } else { String SuccessValue = ParamClear.Equals("TrueFinish") ? ParamClear : ""; string MoneyCount = MoneyAll(DB, UserAccount, SuccessValue); Response.Write(MoneyCount); } return; } // 解析创建订单参数信息 string machinCode = Request["machinCode"]; if (staticPramsDic != null && staticPramsDic.ContainsKey("machinCode")) { machinCode = staticPramsDic["machinCode"]; } if (machinCode == null) { machinCode = ""; } string soft = Request["soft"]; if (staticPramsDic != null && staticPramsDic.ContainsKey("soft")) { soft = staticPramsDic["soft"]; } if (soft == null) { soft = ""; } string product = Request["product"]; if (staticPramsDic != null && staticPramsDic.ContainsKey("product")) { product = staticPramsDic["product"]; } if (product == null) { product = ""; } string money = Request["money"]; if (staticPramsDic != null && staticPramsDic.ContainsKey("money")) { money = staticPramsDic["money"]; } string ext = Request["ext"]; if (staticPramsDic != null && staticPramsDic.ContainsKey("ext")) { ext = staticPramsDic["ext"]; } if (ext == null) { ext = ""; } string preOrderId = Request["preOrderId"]; if (staticPramsDic != null && staticPramsDic.ContainsKey("preOrderId")) { preOrderId = staticPramsDic["preOrderId"]; } if (preOrderId == null) { preOrderId = ""; } #region 一预下单号不再多次创建订单 String keyOrderId = "O_Id"; String keyLink = "O_Link"; // 若订单号不存在,或不相同则重新记录; 并清空链接地址信息 if (Session[keyOrderId] == null || !(Session[keyOrderId] as string).Equals(preOrderId)) { Session[keyOrderId] = preOrderId; Session[keyLink] = null; } if (Session[keyLink] != null && !(Session[keyLink] as string).Equals("")) { string link = (Session[keyLink] as string); Response.Redirect(link); // 直接重定向到二维码对应链接 return; } #endregion // 支付金额不可为空,根据给定的参数创建订单 if (money != null && !money.Equals("")) { string id = createOrder(machinCode, soft, product, money, ext, preOrderId); if (!id.Equals("")) { string link = Cashier.GetQrLink(DB, money, id); if (!link.Equals("")) { if (!preOrderId.Equals("")) // 设置预下单为扫码成功 { DataBase preDB = new DataBase(ScTool.DBName("pre"), ScTool.UserName, ScTool.Password); Pay.SetScanSuccess(preDB, preOrderId, PayType); } // 若若链接信息不存在,或不相同则重新记录 if (Session[keyLink] == null || !(Session[keyLink] as string).Equals(link)) { Session[keyLink] = link; } Response.Redirect(link); // 重定向到二维码对应链接 } else { deletOrder(id); Response.Write(ScTool.Alert("服务器忙或不支持该金额,请稍候再试! Order.aspx")); } } else { Response.Write("创建订单失败! Order.aspx"); } } else { Response.Write("创建订单金额为空! Order.aspx"); } //List<String> names = DB.DataBaseNames(); // 服务器中所有数据库名称 //List<String> names2 = DB.TableNames(); // 当前数据库中所有表名称 //DB.DeletDataBase("PayDataBase"); //List<String> names3 = DB.DataBaseNames(); // 服务器中所有数据库名称 } }