Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            M_PayPlat platmod  = platBll.SelModelByClass(M_PayPlat.Plat.ECPSS);
            string    md5key   = platmod.MD5Key;
            string    billno   = Request["BillNo"];
            string    amount   = Request["Amount"];
            string    result   = Request["Result"];
            string    Succeed  = Request["Succeed"];
            string    signinfo = Request["SignMD5info"];
            string    md5src   = billno + "&" + amount + "&" + Succeed + "&" + md5key;

            if (signinfo.Equals(FormsAuthentication.HashPasswordForStoringInConfigFile(md5src, "MD5")))
            {
                ZLLog.L(ZLEnum.Log.pay, "汇潮支付 交易状态:" + result + " 支付单:" + billno + " 金额:" + amount);
                if (!Succeed.Equals("88"))
                {
                    ZLLog.L(ZLEnum.Log.pay, "贝付交易失败!支付单:" + billno); return;
                }
                try
                {
                    M_Payment pinfo = payBll.SelModelByPayNo(billno);
                    if (pinfo.Status != (int)M_Payment.PayStatus.NoPay)
                    {
                        return;
                    }
                    pinfo.Status       = (int)M_Payment.PayStatus.HasPayed;
                    pinfo.PlatformInfo = "汇潮支付";       //平台反馈信息
                    pinfo.SuccessTime  = DateTime.Now; //交易成功时间
                    pinfo.CStatus      = true;         //处理状态
                    pinfo.MoneyTrue    = Convert.ToDouble(amount);
                    payBll.Update(pinfo);
                    DataTable orderDT = orderBll.GetOrderbyOrderNo(pinfo.PaymentNum);
                    foreach (DataRow dr in orderDT.Rows)
                    {
                        M_Order_PayLog paylogMod = new M_Order_PayLog();
                        M_OrderList    orderMod  = orderBll.SelModelByOrderNo(dr["OrderNo"].ToString());
                        OrderHelper.FinalStep(pinfo, orderMod, paylogMod);
                    }
                    Response.Write("ok");
                    ZLLog.L(ZLEnum.Log.pay, "汇潮平台支付成功!支付单:" + billno);
                }
                catch (Exception ex)
                {
                    ZLLog.L(ZLEnum.Log.pay, new M_Log()
                    {
                        Action  = "支付回调报错",
                        Message = "平台:汇潮,支付单:" + billno + ",原因:" + ex.Message
                    });
                    Response.Write("erro");
                }
            }
            else
            {
                ZLLog.L(ZLEnum.Log.safe, "汇潮验证失败!支付单:" + billno);
                Response.Write("erro");
            }
        }
Ejemplo n.º 2
0
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            //Stream sr = Request.InputStream;
            //byte[] bytestr = new byte[sr.Length];
            //sr.Read(bytestr, 0, bytestr.Length);
            //string def = Encoding.Default.GetString(bytestr);
            //string utf8 = Encoding.UTF8.GetString(bytestr);



            M_PayPlat platMod = platBll.SelModelByClass(M_PayPlat.Plat.ICBC_NC);
            //infosecapiLib.infosecClass obj = new infosecapiLib.infosecClass();
            ////其返回包含不正确的base64码,必须先替换再解码
            //string tranData = Request["notifydata"];
            //tranData = obj.base64dec(tranData.Replace("%2B", "+").Replace("%3D", "="));
            //string sign = Request["sign"];
            //sign = sign.Replace("%2B", "+").Replace("%3D", "=").Replace("%2F", "/");
            //int ret = obj.verifySign(tranData, function.VToP(platMod.Other), sign);
            //string payno = XMLHelper.GetNode("orderid").Text;
            //if (ret != 0||!GetValue(tranData,"tranStat").Equest("1"))
            //{
            //    //签名错误
            //    Response.Write("failed"); Response.End();
            //}
            //try
            //{
            //    M_Payment pinfo = payBll.SelModelByPayNo(payno);
            //    if (pinfo.Status != (int)M_Payment.PayStatus.NoPay) return;
            //    pinfo.Status = (int)M_Payment.PayStatus.HasPayed;
            //    pinfo.PlatformInfo = "支付宝在线付款";    //平台反馈信息
            //    pinfo.SuccessTime = DateTime.Now;//交易成功时间
            //    pinfo.CStatus = true; //处理状态
            //    pinfo.MoneyTrue = (Convert.ToDecimal(XMLHelper.GetNode("amount").Text) / 100);
            //    payBll.Update(pinfo);
            //    DataTable orderDT = orderBll.GetOrderbyOrderNo(pinfo.PaymentNum);
            //    foreach (DataRow dr in orderDT.Rows)
            //    {
            //        M_Order_PayLog paylogMod = new M_Order_PayLog();
            //        M_OrderList orderMod = orderBll.SelModelByOrderNo(dr["OrderNo"].ToString());
            //        OrderHelper.FinalStep(pinfo, orderMod, paylogMod);
            //        orderCom.SendMessage(orderMod, paylogMod, "payed");
            //        //orderCom.SaveSnapShot(orderMod);
            //    }
            //    Response.Write("OK");
            //}
            //catch (Exception ex)
            //{
            //    ZLLog.L(ZLEnum.Log.safe, new M_Log()
            //    {
            //        Action = "支付回调报错",
            //        Message = "平台:南昌工行,支付单:" + payno + ",原因:" + ex.Message
            //    });
            //}
        }
    }
Ejemplo n.º 3
0
 public B_Alipay_Bank_Config()
 {
     info = bll.SelModelByClass(M_PayPlat.Plat.Alipay_Bank);
     //↓↓↓↓↓↓↓↓↓↓请在这里配置您的基本信息↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓
     //合作身份者ID,以2088开头由16位纯数字组成的字符串
     partner = info.AccountID;
     //交易安全检验码,由数字和字母组成的32位字符串
     key = info.MD5Key;
     //↑↑↑↑↑↑↑↑↑↑请在这里配置您的基本信息↑↑↑↑↑↑↑↑↑↑↑↑↑↑↑
     //字符编码格式 目前支持 gbk 或 utf-8
     input_charset = "utf-8";
     //签名方式,选择项:RSA、DSA、MD5
     sign_type = "MD5";
 }
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         M_PayPlat platmod = platBll.SelModelByClass(M_PayPlat.Plat.ECPSS);
         string    md5key  = platmod.MD5Key;
         BillNo_L.Text = Request["BillNo"];
         Amount_L.Text = Request["Amount"];
         Result_L.Text = Request["Result"];
         string Succeed  = Request["Succeed"];
         string signinfo = Request["SignMD5info"];
         string md5src   = BillNo_L.Text + "&" + Amount_L.Text + "&" + Succeed + "&" + md5key;
         if (!signinfo.Equals(FormsAuthentication.HashPasswordForStoringInConfigFile(md5src, "MD5")))
         {
             function.WriteErrMsg("网页验证失败!");
         }
     }
 }
Ejemplo n.º 5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //DataTable pay = payPlatBll.GetPayPlatByClassid(12);
            M_PayPlat platMod = payPlatBll.SelModelByClass(M_PayPlat.Plat.Alipay_Instant);
            SortedDictionary <string, string> sArrary = GetRequestPost();

            ///////////////////////以下参数是需要设置的相关配置参数,设置后不会更改的//////////////////////
            ZoomLa.Model.M_Alipay_config con = new ZoomLa.Model.M_Alipay_config();
            string partner       = platMod.AccountID;
            string key           = platMod.MD5Key;
            string input_charset = con.Input_charset;
            string sign_type     = con.Sign_type;
            string transport     = con.Transport;

            //////////////////////////////////////////////////////////////////////////////////////////////
            if (sArrary.Count > 0)//判断是否有带返回参数
            {
                ZoomLa.BLL.B_Alipay_notify aliNotify = new ZoomLa.BLL.B_Alipay_notify(sArrary, Request.Form["notify_id"], partner, key, input_charset, sign_type, transport);
                string responseTxt = aliNotify.ResponseTxt;     //获取远程服务器ATN结果,验证是否是支付宝服务器发来的请求
                string sign        = Request.Form["sign"];
                string mysign      = aliNotify.Mysign;          //获取通知返回后计算后(验证)的签名结果
                                                                //判断responsetTxt是否为ture,生成的签名结果mysign与获得的签名结果sign是否一致
                                                                //responsetTxt的结果不是true,与服务器设置问题、合作身份者ID、notify_id一分钟失效有关
                                                                //mysign与sign不等,与安全校验码、请求时的参数格式(如:带自定义参数等)、编码格式有关
                string order_no = Request.Form["out_trade_no"]; //获取订单号
                ZLLog.L(ZLEnum.Log.pay, PayPlat + aliNotify.ResponseTxt + ":" + order_no + ":" + Request.Form["buyer_email"] + ":" + Request.Form["trade_status"] + ":" + Request.Form["price"] + ":" + Request.Form["subject"]);
                if (responseTxt == "true" && sign == mysign)    //验证成功
                {
                    //——请根据您的业务逻辑来编写程序(以下代码仅作参考)——
                    //获取通知返回参数,可参考技术文档中服务器异步通知参数列表
                    string trade_no     = Request.Form["trade_no"];       //交易号
                    string total_fee    = Request.Form["price"];          //获取总金额
                    string subject      = Request.Form["subject"];        //商品名称、
                    string body         = Request.Form["body"];           //商品描述、订单备注、描述
                    string buyer_email  = Request.Form["buyer_email"];    //买家账号
                    string trade_status = Request.Form["trade_status"];   //交易状态
                    if (Request.Form["trade_status"] == "WAIT_BUYER_PAY") //没有付款
                    {
                    }
                    else if (trade_status.Equals("WAIT_SELLER_SEND_GOODS"))//付款成功,但是卖家没有发货
                    {
                    }
                    else if (trade_status.Equals("TRADE_SUCCESS"))//付款成功
                    {
                        try
                        {
                            M_Payment pinfo = payBll.SelModelByPayNo(order_no);
                            if (pinfo.Status != (int)M_Payment.PayStatus.NoPay)
                            {
                                return;
                            }
                            pinfo.Status       = (int)M_Payment.PayStatus.HasPayed;
                            pinfo.PlatformInfo = PayPlat;      //平台反馈信息
                            pinfo.SuccessTime  = DateTime.Now; //交易成功时间
                            pinfo.CStatus      = true;         //处理状态
                            pinfo.AlipayNO     = trade_no;     //保存支付宝交易号
                            pinfo.MoneyTrue    = Convert.ToDouble(total_fee);
                            payBll.Update(pinfo);
                            DataTable orderDT = orderBll.GetOrderbyOrderNo(pinfo.PaymentNum);
                            foreach (DataRow dr in orderDT.Rows)
                            {
                                M_Order_PayLog paylogMod = new M_Order_PayLog();
                                M_OrderList    orderMod  = orderBll.SelModelByOrderNo(dr["OrderNo"].ToString());
                                OrderHelper.FinalStep(pinfo, orderMod, paylogMod);
                                orderCOM.SendMessage(orderMod, paylogMod, "payed");
                            }
                            Response.Write("success");
                            ZLLog.L(ZLEnum.Log.pay, PayPlat + "成功!支付单:" + order_no);
                        }
                        catch (Exception ex)
                        {
                            ZLLog.L(ZLEnum.Log.pay, new M_Log()
                            {
                                Action  = "支付回调报错",
                                Message = PayPlat + ",支付单:" + order_no + ",原因:" + ex.Message
                            });
                        }
                    }
                    else if (Request.Form["trade_status"] == "WAIT_BUYER_CONFIRM_GOODS")//卖家已经发货,等待买家确认
                    {
                    }
                    else if (Request.Form["trade_status"] == "TRADE_FINISHED")
                    {
                    }
                    else//其他状态判断。普通即时到帐中,其他状态不用判断,直接打印success。
                    {
                        ZLLog.L(PayPlat + "付款未成功截获,单号:[" + trade_status + "]");
                    }
                }
                else//验证失败
                {
                    ZLLog.L(ZLEnum.Log.pay, new M_Log()
                    {
                        Action  = "支付验证失败",
                        Message = PayPlat + ",支付单:" + order_no
                    });
                    Response.Write("fail");
                }
            }
            else
            {
                Response.Write("success");
            }
        }
Ejemplo n.º 6
0
        /*
         * 仅支持支付单
         */
        protected void Page_Load(object sender, EventArgs e)
        {
            B_User.CheckIsLogged(Request.RawUrl);
            M_UserInfo mu = buser.GetLogin(false);

            if (string.IsNullOrEmpty(SiteConfig.SiteInfo.SiteUrl))
            {
                function.WriteErrMsg("错误,管理员未定义网站地址,SiteUrl");
            }
            string siteurl = (SiteConfig.SiteInfo.SiteUrl.TrimEnd('/') + "/PayOnline/");

            if (string.IsNullOrEmpty(PayNo))
            {
                function.WriteErrMsg("请传入支付单号");
            }
            pinfo = paymentBll.SelModelByPayNo(PayNo);
            if (pinfo == null || pinfo.PaymentID < 1)
            {
                function.WriteErrMsg("支付单不存在");
            }
            M_PayPlat payPlat = payPlatBll.SelReturnModel(pinfo.PayPlatID);

            if (!IsPostBack)
            {
                #region 母版页中信息
                logged_div.Visible = true;
                #endregion
                if (pinfo.Status != (int)M_Payment.PayStatus.NoPay)
                {
                    function.WriteErrMsg("支付单不能重复付款");
                }
                Rurl_Href.NavigateUrl = "/Extend/order.aspx";//返回我的订单
                if (pinfo.PaymentNum.Contains("IDC"))
                {
                    Rurl_Href.NavigateUrl = "/Plugins/Domain/ViewHave.aspx";
                }
                string url = Request.CurrentExecutionFilePath;
                urlReq1 = Request.Url.AbsoluteUri.ToString().Substring(0, Request.Url.AbsoluteUri.ToString().LastIndexOf('/'));
                double vmoney   = pinfo.MoneyReal;                //支付金额
                string v_amount = pinfo.MoneyReal.ToString("f2"); //实际支付金额
                if (string.IsNullOrEmpty(PayMethod))
                {
                    #region 现金支付
                    DataTable orderDB1  = orderBll.GetOrderbyOrderNo(pinfo.PaymentNum);//订单表,ZL_OrderInfo
                    int       orderType = 0;
                    if (orderDB1.Rows.Count > 0)
                    {
                        orderType = DataConvert.CLng(orderDB1.Rows[0]["OrderType"]);
                    }
                    DataTable ordertable = orderBll.GetOrderbyOrderNo(pinfo.PaymentNum);
                    if (pinfo.PayPlatID == 0 && !string.IsNullOrEmpty(pinfo.PlatformInfo))//支付宝网银支付
                    {
                        payPlat = payPlatBll.SelModelByClass(M_PayPlat.Plat.Alipay_Bank);
                        alipayBank(pinfo.PlatformInfo);
                    }
                    if (payPlat.PayClass == 99)//线下支付
                    {
                        function.WriteSuccessMsg("信息已记录,请等待商家联系完成线下付款", Rurl_Href.NavigateUrl);
                    }
                    if (payPlat == null || payPlat.PayPlatID < 1)
                    {
                        function.WriteErrMsg("没有找到对应的支付平台信息!");
                    }
                    if (payPlat.PayClass == 100)//货到付款
                    {
                        payinfo_div.Visible = false;
                        AfterPay_Tb.Visible = true;
                        Title = "下单成功!";
                    }
                    else
                    {
                        payinfo_div.Visible = true;
                        AfterPay_Tb.Visible = false;
                    }
                    switch ((M_PayPlat.Plat)payPlat.PayClass)//现仅开通 12:支付宝即时到账和支付宝网银服务,15支付宝网银服务(上方代码中处理),银币与余额服务
                    {
                        #region 各种支付方式
                    case M_PayPlat.Plat.UnionPay:
                        #region 银联在线
                        //gateway = "https://pay3.chinabank.com.cn/PayGate?encoding=UTF-8";
                        //必要的交易信息
                        string wv_amount    = v_amount;                              // 订单金额
                        string wv_moneytype = "CNY";                                 // 币种
                        string wv_md5info;                                           // 对拼凑串MD5私钥加密后的值
                        string wv_mid = payPlat.AccountID;                           // 商户号
                        //v_urlBuilder.Append("http://localhost:86/PayOnline/PayReceive.aspx?PayID=" +payid);
                        string wv_url = urlReq1 + "/PayReceive.aspx?PayNo=" + PayNo; // 返回页地址
                        string wv_oid = pinfo.PayNo;                                 // 推荐订单号构成格式为 年月日-商户号-小时分钟秒
                        //两个备注

                        // wv_mid = "1001";				 商户号,这里为测试商户号20000400,替换为自己的商户号即可
                        // wv_url = "http://localhost/chinabank/Receive.aspx";  商户自定义返回接收支付结果的页面
                        // MD5密钥要跟订单提交页相同,如Send.asp里的 key = "test" ,修改""号内 test 为您的密钥
                        string wkey = payPlat.MD5Key;                                    // 如果您还没有设置MD5密钥请登录我们为您提供商户后台,地址:https://merchant3.chinabank.com.cn/
                        // 登录后在上面的导航栏里可能找到“B2C”,在二级导航栏里有“MD5密钥设置”
                        // 建议您设置一个16位以上的密钥或更高,密钥最多64位,但设置16位已经足够了
                        wv_amount    = v_amount;    // 订单金额
                        wv_moneytype = "CNY";       // 币种
                        //对拼凑串MD5私钥加密后的值
                        wv_mid = payPlat.AccountID; // 商户号
                        wv_oid = pinfo.PayNo;       // 推荐订单号构成格式为 年月日-商户号-小时分钟秒

                        if (wv_oid == null || wv_oid.Equals(""))
                        {
                            DateTime dt       = DateTime.Now;
                            string   wv_ymd   = dt.ToString("yyyyMMdd"); // yyyyMMdd
                            string   wtimeStr = dt.ToString("HHmmss");   // HHmmss
                            wv_oid = wv_ymd + wv_mid + wtimeStr;
                        }
                        string text = wv_amount + wv_moneytype + wv_oid + wv_mid + wv_url + wkey;     // 拼凑加密串
                        wv_md5info = System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(text, "md5").ToUpper();
                        //strHiddenField.Append("<input type='hidden' name='v_md5info' value='" + wv_md5info + "'>\n");
                        //strHiddenField.Append("<input type='hidden' name='v_mid' value='" + wv_mid + "'>\n");
                        //strHiddenField.Append("<input type='hidden' name='v_oid' value='" + wv_oid + "'>\n");
                        //strHiddenField.Append("<input type='hidden' name='v_amount' value='" + wv_amount + "' >\n");
                        //strHiddenField.Append("<input type='hidden' name='v_moneytype' value='" + wv_moneytype + "'>\n");
                        //strHiddenField.Append("<input type='hidden' name='v_url' value='" + wv_url + "'>\n");
                        //    //以下几项只是用来记录客户信息,可以不用,不影响支付
                        //    strHiddenField.Append("<input type='hidden' name='v_rcvname' value='" + "" + "'>\n");
                        //    strHiddenField.Append("<input type='hidden' name='v_rcvaddr' value='" + "" + "'>\n");
                        //    strHiddenField.Append("<input type='hidden' name='v_rcvtel' value='" + "" + "'>\n");
                        //    strHiddenField.Append("<input type='hidden' name='v_rcvpost' value='" + "" + "' >\n");
                        //    strHiddenField.Append("<input type='hidden' name='v_rcvemail' value='" + "" + "'>\n");
                        //    strHiddenField.Append("<input type='hidden' name='v_rcvmobile' value='" + "" + "'>\n");
                        //    strHiddenField.Append("<input type='hidden' name='v_ordername' value='" + "" + "' >\n");
                        //    strHiddenField.Append("<input type='hidden' name='v_orderaddr' value='" + "" + "'>\n");
                        //    strHiddenField.Append("<input type='hidden' name='v_ordertel' value='" + "" + "'>\n");
                        //    strHiddenField.Append("<input type='hidden' name='v_orderpost' value='" + "" + "' >\n");
                        //    strHiddenField.Append("<input type='hidden' name='v_orderemail' value='" + "" + "'>\n");
                        //    strHiddenField.Append("<input type='hidden' name='v_ordermobile' value='" + "" + "'>\n");
                        //    strHiddenField.Append("<input type='hidden' name='Package' value='" + Request.QueryString["Package"] + "'>\n");
                        #endregion
                        break;

                    case M_PayPlat.Plat.ChinaUnionPay:
                    {
                        #region 中国银联
                        Dictionary <string, string> param = new Dictionary <string, string>();

                        //以下信息非特殊情况不需要改动
                        param["version"]      = "5.0.0";                                      //版本号
                        param["encoding"]     = "UTF-8";                                      //编码方式
                        param["txnType"]      = "01";                                         //交易类型
                        param["txnSubType"]   = "01";                                         //交易子类
                        param["bizType"]      = "000201";                                     //业务类型
                        param["signMethod"]   = "01";                                         //签名方法
                        param["channelType"]  = "08";                                         //渠道类型
                        param["accessType"]   = "0";                                          //接入类型
                        param["frontUrl"]     = siteurl + "/Return/ChinaUnionPay.aspx";       //前台通知地址
                        param["backUrl"]      = siteurl + "/Return/ChinaUnionPayNotify.aspx"; //后台通知地址
                        param["currencyCode"] = "156";                                        //交易币种

                        //TODO 以下信息需要填写
                        param["merId"]           = payPlat.AccountID;                         //商户号,请改自己的测试商户号,此处默认取demo演示页面传递的参数
                        param["orderId"]         = pinfo.PayNo;                               //商户订单号,8-32位数字字母,不能含“-”或“_”,此处默认取demo演示页面传递的参数,可以自行定制规则
                        param["txnTime"]         = DateTime.Now.ToString("yyyyMMddHHmmss");   //订单发送时间,格式为YYYYMMDDhhmmss,取北京时间,此处默认取demo演示页面传递的参数,参考取法: DateTime.Now.ToString("yyyyMMddHHmmss")
                        param["txnAmt"]          = ((int)(pinfo.MoneyReal * 100)).ToString(); //交易金额,单位分,此处默认取demo演示页面传递的参数
                        LblHiddenValue.InnerHtml = PayHelper.BuildForm("https://101.231.204.80:5000/gateway/api/frontTransReq.do", param);
                        Alipay_Btn.Visible       = true;
                        #endregion
                    }
                    break;

                    case M_PayPlat.Plat.Alipay_Instant:
                        #region 支付宝[即时到帐]
                        string input_charset1 = "utf-8";
                        string notify_url1    = urlReq1 + "/Return/AlipayNotify.aspx"; //付完款后服务器AJAX通知的页面 要用 http://格式的完整路径,不允许加?id=123这类自定义参数
                        string return_url1    = urlReq1 + "/Return/AlipayReturn.aspx"; //付完款后跳转的页面 要用 http://格式的完整路径,不允许加?id=123这类自定义参数
                        string show_url1      = "";
                        string sign_type1     = "MD5";
                        ///////////////////////以下参数是需要通过下单时的订单数据传入进来获得////////////////////////////////
                        //必填参数
                        string price1             = pinfo.MoneyReal.ToString("f2");  //订单总金额,显示在支付宝收银台里的“商品单价”里
                        string logistics_fee1     = "0.00";                          //物流费用,即运费。
                        string logistics_type1    = "POST";                          //物流类型,三个值可选:EXPRESS(快递)、POST(平邮)、EMS(EMS)
                        string logistics_payment1 = "SELLER_PAY";                    //物流支付方式,两个值可选:SELLER_PAY(卖家承担运费)、BUYER_PAY(买家承担运费)
                        string out_trade_no1      = pinfo.PayNo;                     //请与贵网站订单系统中的唯一订单号匹配
                        string subject1           = pinfo.Remark;                    //订单名称,显示在支付宝收银台里的“商品名称”里,显示在支付宝的交易管理的“商品名称”的列表里。
                        string body1            = pinfo.Remark;                      //订单描述、订单详细、订单备注,显示在支付宝收银台里的“商品描述”里
                        string quantity1        = "1";                               //商品数量,建议默认为1,不改变值,把一次交易看成是一次下订单而非购买一件商品。
                        string receive_name1    = "";                                //收货人姓名,如:张三
                        string receive_address1 = "";                                //收货人地址,如:XX省XXX市XXX区XXX路XXX小区XXX栋XXX单元XXX号
                        string receive_zip1     = "";                                //收货人邮编,如:123456
                        string receive_phone1   = "";                                //收货人电话号码,如:0571-81234567
                        string receive_mobile1  = "";                                //收货人手机号码,如:13312341234
                        //---------------------
                        string receive_name    = orderDB1.Rows[0]["Reuser"] + "";    //收货人姓名,如:张三
                        string receive_address = orderDB1.Rows[0]["Jiedao"] + "";    //收货人地址,如:XX省XXX市XXX区XXX路XXX小区XXX栋XXX单元XXX号
                        string receive_zip     = orderDB1.Rows[0]["ZipCode"] + "";   //收货人邮编,如:123456
                        string receive_phone   = orderDB1.Rows[0]["Phone"] + "";     //收货人电话号码,如:0571-81234567
                        string receive_mobile  = orderDB1.Rows[0]["MobileNum"] + ""; //收货人手机号码,如:13312341234
                        //扩展参数——第二组物流方式
                        //物流方式是三个为一组成组出现。若要使用,三个参数都需要填上数据;若不使用,三个参数都需要为空
                        //有了第一组物流方式,才能有第二组物流方式,且不能与第一个物流方式中的物流类型相同,
                        //即logistics_type="EXPRESS",那么logistics_type_1就必须在剩下的两个值(POST、EMS)中选择
                        string logistics_fee_3     = "";                                                    //物流费用,即运费。
                        string logistics_type_3    = "";                                                    //物流类型,三个值可选:EXPRESS(快递)、POST(平邮)、EMS(EMS)
                        string logistics_payment_3 = "";                                                    //物流支付方式,两个值可选:SELLER_PAY(卖家承担运费)、BUYER_PAY(买家承担运费)

                        //扩展参数——第三组物流方式
                        //物流方式是三个为一组成组出现。若要使用,三个参数都需要填上数据;若不使用,三个参数都需要为空
                        //有了第一组物流方式和第二组物流方式,才能有第三组物流方式,且不能与第一组物流方式和第二组物流方式中的物流类型相同,
                        //即logistics_type="EXPRESS"、logistics_type_1="EMS",那么logistics_type_2就只能选择"POST"
                        string logistics_fee_4     = "";                                                        //物流费用,即运费。
                        string logistics_type_4    = "";                                                        //物流类型,三个值可选:EXPRESS(快递)、POST(平邮)、EMS(EMS)
                        string logistics_payment_4 = "";                                                        //物流支付方式,两个值可选:SELLER_PAY(卖家承担运费)、BUYER_PAY(买家承担运费)
                        //扩展功能参数——其他
                        string buyer_email1 = "";                                                               //默认买家支付宝账号
                        string discount1    = "";                                                               //折扣,是具体的金额,而不是百分比。若要使用打折,请使用负数,并保证小数点最多两位数
                        /////////////////////////////////////////////////////////////////////////////////////////////////////
                        //构造请求函数,无需修改
                        B_AliPay_trades_Services aliService1 = new B_AliPay_trades_Services(
                            payPlat.AccountID,
                            payPlat.SellerEmail,
                            return_url1,
                            notify_url1,
                            show_url1,
                            out_trade_no1,
                            subject1,
                            body1,
                            price1,
                            logistics_fee1,
                            logistics_type1,
                            logistics_payment1,
                            quantity1,
                            receive_name1,
                            receive_address1,
                            receive_zip1,
                            receive_phone1,
                            receive_mobile1,
                            logistics_fee_3,
                            logistics_type_3,
                            logistics_payment_3,
                            logistics_fee_4,
                            logistics_type_4,
                            logistics_payment_4,
                            buyer_email1,
                            discount1,
                            payPlat.MD5Key,
                            input_charset1,
                            sign_type1);
                        Alipay_Btn.Visible       = true;
                        LblHiddenValue.InnerHtml = aliService1.Build_Form();
                        #endregion
                        break;

                    case M_PayPlat.Plat.Alipay_H5:
                    {
                        Response.Redirect("/API/Pay/Alipay_H5.aspx?Payno=" + PayNo);
                    }
                    break;

                    case M_PayPlat.Plat.Alipay_Bank:    //支付宝网银,已上方处理
                        break;

                    case M_PayPlat.Plat.Bill:
                        #region 快钱支付
                    {
                        //人民币网关账户号
                        ///请登录快钱系统获取用户编号,用户编号后加01即为人民币网关账户号。
                        string merchantAcctId = payPlat.AccountID;
                        //人民币网关密钥
                        ///区分大小写.请与快钱联系索取
                        String key = payPlat.MD5Key;
                        //字符集.固定选择值。可为空。
                        ///只能选择1、2、3.
                        ///1代表UTF-8; 2代表GBK; 3代表gb2312
                        ///默认值为1
                        string inputCharset = "1";
                        //接受支付结果的页面地址.与[bgUrl]不能同时为空。必须是绝对地址。
                        ///如果[bgUrl]为空,快钱将支付结果Post到[pageUrl]对应的地址。
                        ///如果[bgUrl]不为空,并且[bgUrl]页面指定的<redirecturl>地址不为空,则转向到<redirecturl>对应的地址
                        ///
                        ///快钱通过服务器连接的方式将交易结果发送到[bgUrl]对应的页面地址,在商户处理完成后输出的<result>如果为1,页面会转向到<redirecturl>对应的地址。
                        ///如果快钱未接收到<redirecturl>对应的地址,快钱将把支付结果post到[pageUrl]对应的页面。
                        string bgUrl = "PayOnline/PayResultAlipayInstant.aspx?";
                        //网关版本.固定值
                        ///快钱会根据版本号来调用对应的接口处理程序。
                        ///本代码版本号固定为v2.0
                        string version = "v2.0";
                        //语言种类.固定选择值。
                        ///只能选择1、2、3
                        ///1代表中文;2代表英文
                        ///默认值为1
                        string language = "1";
                        //签名类型.固定值
                        ///1代表MD5签名
                        ///当前版本固定为1
                        string signType = "1";
                        //支付人姓名
                        ///可为中文或英文字符
                        string payerName = "payerName";
                        //支付人联系方式类型.固定选择值
                        ///只能选择1
                        ///1代表Email
                        string payerContactType = "1";
                        //支付人联系方式
                        ///只能选择Email或手机号
                        string payerContact = "";
                        //商户订单号
                        ///由字母、数字、或[-][_]组成
                        string orderId = pinfo.PayNo;        // DateTime.Now.ToString("yyyyMMddHHmmss");
                                                             //订单金额
                        ///以分为单位,必须是整型数字
                        ///比方2,代表0.02元
                        double moneys = DataConverter.CDouble(v_amount);
                        moneys = moneys * 100;
                        string orderAmount = DataConverter.CLng(moneys).ToString();

                        //订单提交时间
                        ///14位数字。年[4位]月[2位]日[2位]时[2位]分[2位]秒[2位]
                        ///如;20080101010101
                        string orderTime = DateTime.Now.ToString("yyyyMMddHHmmss");
                        //商品名称
                        ///可为中文或英文字符
                        string productName = "product";
                        //商品数量
                        ///可为空,非空时必须为数字
                        string productNum = "1";
                        //商品代码
                        ///可为字符或者数字
                        string productId = "1";
                        //商品描述
                        string productDesc = pinfo.Remark;
                        //扩展字段1
                        ///在支付结束后原样返回给商户
                        string ext1 = "";
                        //扩展字段2
                        ///在支付结束后原样返回给商户
                        string ext2 = "";
                        //支付方式.固定选择值
                        ///只能选择00、10、11、12、13、14
                        ///00:组合支付(网关支付页面显示快钱支持的各种支付方式,推荐使用)10:银行卡支付(网关支付页面只显示银行卡支付).11:电话银行支付(网关支付页面只显示电话支付).12:快钱账户支付(网关支付页面只显示快钱账户支付).13:线下支付(网关支付页面只显示线下支付方式).14:B2B支付(网关支付页面只显示B2B支付,但需要向快钱申请开通才能使用)
                        string payType = "00";

                        //银行代码
                        ///实现直接跳转到银行页面去支付,只在payType=10时才需设置参数
                        ///具体代码参见 接口文档银行代码列表
                        string bankId = "";

                        //同一订单禁止重复提交标志
                        ///固定选择值: 1、0
                        ///1代表同一订单号只允许提交1次;0表示同一订单号在没有支付成功的前提下可重复提交多次。默认为0建议实物购物车结算类商户采用0;虚拟产品类商户采用1
                        string redoFlag = "0";

                        //快钱的合作伙伴的账户号
                        ///如未和快钱签订代理合作协议,不需要填写本参数
                        string pid = "";
                        //生成加密签名串
                        ///请务必按照如下顺序和规则组成加密串!
                        String signMsgVal = "";
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "inputCharset", inputCharset);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "pageUrl", siteurl + "Return/Bill99Notify.aspx");
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "bgUrl", bgUrl);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "version", version);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "language", language);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "signType", signType);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "merchantAcctId", merchantAcctId);        //merchantAcctId
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "payerName", payerName);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "payerContactType", payerContactType);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "payerContact", payerContact);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "orderId", orderId);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "orderAmount", orderAmount);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "orderTime", orderTime);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "productName", productName);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "productNum", productNum);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "productId", productId);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "productDesc", productDesc);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "ext1", ext1);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "ext2", ext2);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "payType", payType);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "bankId", bankId);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "redoFlag", redoFlag);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "pid", pid);
                        signMsgVal = Bill99Helper.appendParam(signMsgVal, "key", key);
                        string signMsg = StringHelper.MD5(signMsgVal).ToUpper();

                        Dictionary <string, string> payform_dics = new Dictionary <string, string>();
                        payform_dics.Add("inputCharset", inputCharset);
                        payform_dics.Add("bgUrl", bgUrl);
                        payform_dics.Add("pageUrl", siteurl + "Return/Bill99Notify.aspx");        //服务器接受支付结果的后台地址.与[pageUrl]不能同时为空。必须是绝对地址。
                        payform_dics.Add("version", version);
                        payform_dics.Add("language", language);
                        payform_dics.Add("signType", signType);
                        payform_dics.Add("signMsg", signMsg);
                        payform_dics.Add("merchantAcctId", merchantAcctId);
                        payform_dics.Add("payerName", payerName);
                        payform_dics.Add("payerContactType", payerContactType);
                        payform_dics.Add("orderId", orderId);
                        payform_dics.Add("orderAmount", orderAmount);
                        payform_dics.Add("orderTime", orderTime);
                        payform_dics.Add("productName", productName);
                        payform_dics.Add("productNum", productNum);
                        payform_dics.Add("productId", productId);
                        payform_dics.Add("productDesc", productDesc);
                        payform_dics.Add("ext1", ext1);
                        payform_dics.Add("ext2", ext2);
                        payform_dics.Add("payType", payType);
                        payform_dics.Add("bankId", bankId);
                        payform_dics.Add("redoFlag", redoFlag);
                        payform_dics.Add("pid", pid);
                        payform_dics.Add("Package", Request.QueryString["Package"]);
                        LblHiddenValue.InnerHtml = PayHelper.BuildForm("https://www.99bill.com/gateway/recvMerchantInfoAction.htm", payform_dics);
                        Alipay_Btn.Visible       = true;
                    }
                        #endregion
                        break;

                    case M_PayPlat.Plat.WXPay:
                        #region 微信扫码支付
                    {
                        if (DeviceHelper.GetBrower() == DeviceHelper.Brower.Micro)
                        {
                            Response.Redirect("/PayOnline/wxpay_mp.aspx?payno=" + pinfo.PayNo);
                            return;
                        }
                        pinfo.PlatformInfo = "0";
                        paymentBll.Update(pinfo);
                        WxPayData wxdata = new WxPayData();
                        wxdata.SetValue("out_trade_no", pinfo.PayNo);
                        wxdata.SetValue("body", string.IsNullOrEmpty(pinfo.Remark) ? "微信支付" : pinfo.Remark);
                        wxdata.SetValue("total_fee", Convert.ToInt32(pinfo.MoneyReal * 100));
                        wxdata.SetValue("trade_type", "NATIVE");
                        wxdata.SetValue("notify_url", urlReq1 + "/Return/WxPayReturn.aspx");
                        wxdata.SetValue("product_id", "1");
                        WxPayData result = WxPayApi.UnifiedOrder(wxdata, WxPayApi.Pay_GetByID());
                        if (result.GetValue("return_code").ToString().Equals("FAIL"))
                        {
                            function.WriteErrMsg("商户" + result.GetValue("return_msg"));
                        }
                        Response.Redirect("/PayOnline/WxCodePay.aspx?PayNo=" + pinfo.PayNo + "&wxcode=" + result.GetValue("code_url"));
                    }
                        #endregion
                        break;

                    case M_PayPlat.Plat.Ebatong:
                        #region Ebatong
                    {
                        Dictionary <string, string> ebatong_dics = new Dictionary <string, string>();
                        ebatong_dics.Add("sign_type", "MD5");
                        ebatong_dics.Add("service", "create_direct_pay_by_user");
                        ebatong_dics.Add("partner", payPlat.AccountID);
                        ebatong_dics.Add("input_charset", "UTF-8");
                        ebatong_dics.Add("notify_url", siteurl + "Return/EbatongNotify.aspx");        //服务器异步通知页面路径
                        ebatong_dics.Add("return_url", siteurl + "Return/EbatongReturn.aspx");        //服务器跳转页面
                        ebatong_dics.Add("out_trade_no", pinfo.PayNo);
                        ebatong_dics.Add("subject", pinfo.Remark);
                        ebatong_dics.Add("exter_invoke_ip", Request.UserHostAddress);
                        ebatong_dics.Add("payment_type", "1");
                        ebatong_dics.Add("seller_id", payPlat.AccountID);
                        ebatong_dics.Add("total_fee", pinfo.MoneyReal.ToString("f2"));
                        ebatong_dics.Add("error_notify_url", "");
                        ebatong_dics.Add("anti_phishing_key", new ZoomLa.BLL.Ebatong.AskForTimestamp().askFor(payPlat.AccountID, payPlat.MD5Key));
                        ebatong_dics.Add("seller_email", "");
                        ebatong_dics.Add("buyer_email", "");
                        ebatong_dics.Add("buyer_id", "");
                        ebatong_dics.Add("price", "");
                        ebatong_dics.Add("quantity", "");
                        ebatong_dics.Add("body", "");
                        ebatong_dics.Add("show_url", "");
                        ebatong_dics.Add("pay_method", "bankPay");
                        ebatong_dics.Add("extra_common_para", "");
                        ebatong_dics.Add("extend_param", "");
                        ebatong_dics.Add("it_b_pay", "");
                        ebatong_dics.Add("royalty_type", "");
                        ebatong_dics.Add("royalty_parameters", "");
                        ebatong_dics.Add("default_bank", "");
                        string[] paramts = new string[ebatong_dics.Keys.Count]; //参数排序数组
                        ebatong_dics.Keys.CopyTo(paramts, 0);
                        Array.Sort(paramts);                                    //参数排序操作
                        string paramstr = "";
                        foreach (string item in paramts)
                        {
                            paramstr += string.Format("{0}={1}&", item, ebatong_dics[item]);
                        }
                        //throw new Exception(paramstr.Trim('&'));
                        string md5md5 = new ZoomLa.BLL.Ebatong.CommonHelper().md5("UTF-8", paramstr.Trim('&') + payPlat.MD5Key).ToLower();
                        ebatong_dics.Add("sign", md5md5);
                        LblHiddenValue.InnerHtml = PayHelper.BuildForm("https://www.ebatong.com/direct/gateway.htm", ebatong_dics);
                        Alipay_Btn.Visible       = true;
                    }
                        #endregion
                        break;

                    case M_PayPlat.Plat.CCB:
                        #region 江西建行
                    {
                        Dictionary <string, string> ccb_dics = new Dictionary <string, string>();
                        ccb_dics.Add("MERCHANTID", payPlat.AccountID);    //商户代码
                        ccb_dics.Add("POSID", payPlat.PrivateKey);        //柜台代码
                        ccb_dics.Add("BRANCHID", payPlat.PublicKey);      //分行代码
                        ccb_dics.Add("ORDERID", pinfo.PayNo);
                        ccb_dics.Add("PAYMENT", pinfo.MoneyReal.ToString("f2"));
                        ccb_dics.Add("CURCODE", "01");
                        ccb_dics.Add("REMARK1", "");        //备注信息1(具体信息待测试)
                        ccb_dics.Add("REMARK2", "");        //备注信息2
                        ccb_dics.Add("TXCODE", "520100");
                        string ccb_paramstr = "";
                        foreach (String item in ccb_dics.Keys)
                        {
                            ccb_paramstr += string.Format("{0}={1}&", item, ccb_dics[item]);
                        }
                        string md5str = new ZoomLa.BLL.Ebatong.CommonHelper().md5("UTF-8", ccb_paramstr.Trim('&')).ToLower();
                        ccb_dics.Add("MAC", md5str);
                        LblHiddenValue.InnerHtml = PayHelper.BuildForm("https://ibsbjstar.ccb.com.cn/app/ccbMain", ccb_dics);
                        Alipay_Btn.Visible       = true;
                        //Response.Redirect("https://ibsbjstar.ccb.com.cn/app/ccbMain?" + ccb_paramstr + "MAC=" + md5str);
                    }
                        #endregion
                        break;

                    case M_PayPlat.Plat.ECPSS:
                        #region 汇潮支付
                    {
                        Dictionary <string, string> payData = new Dictionary <string, string>();
                        payData.Add("OrderDesc", "test");                              //订单描述
                        payData.Add("Remark", "汇潮支付");                                 //备注
                        payData.Add("AdviceURL", siteurl + "Return/ECPSSNotfy.aspx");  //回调通知地址
                        payData.Add("ReturnURL", siteurl + "Return/ECPSSResult.aspx"); //返回地址
                        payData.Add("BillNo", pinfo.PayNo);                            //订单号
                        payData.Add("MerNo", payPlat.AccountID);                       //商户号
                        payData.Add("Amount", pinfo.MoneyReal.ToString("f2"));         //交易价格
                        string md5key = payPlat.MD5Key;
                        string md5str = payData["MerNo"] + "&" + payData["BillNo"] + "&" + payData["Amount"] + "&" + payData["ReturnURL"] + "&" + md5key;
                        payData.Add("SignInfo", System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(md5str, "MD5")); //签名
                        payData.Add("defaultBankNumber", "");                                                                               //银行代码(选填)
                        payData.Add("orderTime", DateTime.Now.ToString("yyyyMMddHHmmss"));                                                  //交易时间yyyyMMddHHmmss
                        payData.Add("products", pinfo.Remark);                                                                              //物品信息
                        LblHiddenValue.InnerHtml = PayHelper.BuildForm("https://pay.ecpss.com/sslpayment", payData);
                        Alipay_Btn.Visible       = true;
                    }
                        #endregion
                        break;

                    case M_PayPlat.Plat.ICBC_NC:
                        #region 南昌工行
                    {
                        function.WriteErrMsg("工行支付组件未注册,请联系管理员");
                        //ICBCHelper icbc = new ICBCHelper();
                        //infosecapiLib.infosecClass obj = new infosecapiLib.infosecClass();
                        //Dictionary<string, string> dics = new Dictionary<string, string>();
                        //string posturl = "https://B2C.icbc.com.cn/servlet/ICBCINBSEBusinessServlet";
                        //---Debug
                        //payPlat.AccountID = "1502EC24392836";
                        //payPlat.SellerEmail = "1502201009004747554";
                        //payPlat.PrivateKey = "/Cert/cs.key";
                        //payPlat.PublicKey = "/Cert/cs.cer";
                        //posturl = "https://myipad.dccnet.com.cn/servlet/NewB2cMerPayReqServlet";
                        //throw new Exception(payPlat.PrivateKey + ":" + payPlat.PublicKey + ":" + payPlat.AccountID + ":" + payPlat.SellerEmail);
                        //Debug End
                        //*.z01.com根据需要更改如*.hx008.com
                        //string data = icbc.SpliceTranData(pinfo, payPlat.AccountID.Trim(), payPlat.SellerEmail.Trim(), "*.z01.com", siteurl + "ICBCNotify.aspx");
                        //string sign = obj.sign(data, Server.MapPath(payPlat.PrivateKey), payPlat.MD5Key.Trim());//私钥虚拟路径与私钥密钥
                        //dics.Add("interfaceName", "ICBC_PERBANK_B2C");
                        //dics.Add("interfaceVersion", "1.0.0.11");
                        //dics.Add("tranData", obj.base64enc(data));
                        //dics.Add("merSignMsg", sign);
                        //dics.Add("merCert", icbc.ReadCertToBase64(payPlat.PublicKey));//公钥路径
                        //LblHiddenValue.InnerHtml = new Pay_BaoFa().BuildForm(posturl, dics);
                        //Alipay_Btn.Visible = true;
                    }
                        #endregion
                        break;

                    case M_PayPlat.Plat.CashOnDelivery:
                        #region 货到付款
                        zfpt.Text      = payPlat.PayPlatName;
                        ddh.Text       = pinfo.PaymentNum;
                        PayNum_L2.Text = Convert.ToDecimal(vmoney).ToString("F2") + " 元";
                        sxf.Text       = payPlat.Rate.ToString() + " %";
                        sjhbje.Text    = v_amount + " 元";
                        #endregion
                        break;

                    case M_PayPlat.Plat.PayPal:
                    {
                        Response.Redirect("PP/Pay.aspx?Payno=" + pinfo.PayNo);
                    }
                    break;

                    default:
                        throw new Exception("错误:支付方式不存在:" + payPlat.PayClass);
                        #endregion
                    }
                    VMoneyPayed_L.Text = payPlat.PayPlatName;
                    OrderNo_L.Text     = pinfo.PaymentNum;
                    LblRate.Text       = payPlat.Rate.ToString() + " %";
                    #endregion
                }
                else//非现金支付,给用户显示确认支付页,实际支付行为在Confirm_Click
                {
                    spwd_div.Visible    = (!string.IsNullOrEmpty(mu.PayPassWord));
                    nospwd_div.Visible  = string.IsNullOrEmpty(mu.PayPassWord);//如未设定,则不需要输入二级密码
                    payinfo_div.Visible = true;
                    AfterPay_Tb.Visible = false;
                    OrderNo_L.Text      = pinfo.PaymentNum;
                    DataTable ordertable = orderBll.GetOrderbyOrderNo(pinfo.PaymentNum);
                    if (ordertable != null && ordertable.Rows.Count > 0)
                    {
                        switch (PayMethod)
                        {
                        case "Purse":
                            //Titles.Text = "余额支付操作(确认支付款项)";
                            Fee.Text           = "帐户余额:";
                            LblRate.Text       = mu.Purse + " 元";
                            VMoneyPayed_L.Text = "帐户余额";
                            break;

                        case "SilverCoin":
                            //Titles.Text = "银币支付操作(确认支付款项)";
                            Fee.Text           = "帐户银币:";
                            LblRate.Text       = mu.SilverCoin + " 个";
                            VMoneyPayed_L.Text = "账户银币";
                            break;

                        case "Score":
                            //Titles.Text = "积分支付操作(确认支付款项)";
                            Fee.Text           = "帐户积分:";
                            LblRate.Text       = mu.UserExp + " 分";
                            VMoneyPayed_L.Text = "账户积分";
                            break;

                        default:
                            break;
                        }
                    }
                    else
                    {
                        payinfo_div.Visible = false;
                        AfterPay_Tb.Visible = false;
                        function.WriteErrMsg("订单不存在");
                    }
                }
                //显示金额信息
                LblPayMoney.Text = pinfo.MoneyReal.ToString("F2") + " 元";//应付金额
            }
            //------------------检测End;
        }
Ejemplo n.º 7
0
        //支付币种
        //public void BindMoney()
        //{
        //    if (SiteConfig.SiteOption.OpenMoneySel)//如开启则用户选择
        //    {
        //        money_div.Visible = true;
        //        DataTable dt = moneyBll.Sel();
        //        Money_RPT.DataSource = dt;
        //        Money_RPT.DataBind();
        //    }
        //}
        //绑定支付平台信息
        public void BindPlat()
        {
            //后期改为Repeater输出
            DataTable table = platBll.GetPayPlatListAll(0);

            if (table == null || table.Rows.Count < 1)
            {
                function.WriteErrMsg("尚未定义支付平台");
            }
            string image = "";
            string ids   = "";

            foreach (DataRow row in table.Rows)
            {
                ListItem item = new ListItem();
                item.Value = row["PayPlatID"].ToString();
                item.Text  = "";
                ids        = item.Value + "," + ids;
                switch (Convert.ToInt32(row["PayClass"]))
                {
                case 1:
                    image = "alipay," + image;
                    item.Attributes.Add("id", "td_alipay_" + item.Value);
                    break;

                case 2:
                    image = "99bill," + image;
                    item.Attributes.Add("id", "td_99bill_" + item.Value);
                    break;

                case 3:
                    image = "chinabank," + image;
                    item.Attributes.Add("id", "td_chinabank_" + item.Value);
                    break;

                case 4:
                    image = "tenpay," + image;
                    item.Attributes.Add("id", "td_tenpay_" + item.Value);
                    break;

                case 5:
                    image = "yeepay," + image;
                    item.Attributes.Add("id", "td_yeepay_" + item.Value);
                    break;

                case 6:
                    image = "6," + image;
                    item.Attributes.Add("id", "td_6_" + item.Value);
                    break;

                case 8:
                    image = "15173," + image;
                    item.Attributes.Add("id", "td_15173_" + item.Value);
                    break;

                case 9:
                    image = "chinaunion," + image;
                    item.Attributes.Add("id", "td_chinaunion_" + item.Value);
                    break;

                case 10:
                    image = "sdo," + image;
                    item.Attributes.Add("id", "td_sdo_" + item.Value);
                    break;

                case 12:
                    image = "alipayJS," + image;
                    item.Attributes.Add("id", "td_alipayJS_" + item.Value);
                    break;

                //case 13:
                //    image = "chinapnr," + image;
                //    item.Attributes.Add("id", "td_chinapnr_" + item.Value);
                //    break;
                case 15:    //支付宝单网银
                    M_PayPlat info = new M_PayPlat();
                    info = platBll.SelModelByClass(M_PayPlat.Plat.Alipay_Bank);
                    string[] bankArr = info.PayPlatinfo.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
                    for (int i = 0; i < bankArr.Length; i++)
                    {
                        image = bankArr[i] + "," + image;
                        ListItem newItem = new ListItem("", bankArr[i]);
                        newItem.Attributes.Add("id", "td_" + bankArr[i] + "_" + item.Value);
                        if (i > 0)
                        {
                            ids = item.Value + "," + ids;
                        }
                        DDLPayPlat.Items.Add(newItem);
                    }
                    item.Value = "";
                    break;

                case 14:    //交通银行
                    image = "transbank," + image;
                    item.Attributes.Add("id", "td_transbank_" + item.Value);
                    break;

                case 16:    //MO宝支付
                    image = "Mobao," + image;
                    item.Attributes.Add("id", "td_Mobao_" + item.Value);
                    break;

                case 21:    //微信支付
                    image = "wxpay," + image;
                    item.Attributes.Add("id", "td_wxpay_" + item.Value);
                    break;

                case 22:    //宝付
                    image = "baofa," + image;
                    item.Attributes.Add("id", "td_baofa_" + item.Value);
                    break;

                case 23:    //南昌工行
                    image = "ncicbc," + image;
                    item.Attributes.Add("id", "td_ncicbc_" + item.Value);
                    break;

                case 24:
                    image = "95epay," + image;
                    item.Attributes.Add("id", "td_95epay_" + item.Value);
                    break;

                case 25:
                    image = "ebatong," + image;
                    item.Attributes.Add("id", "td_ebatong_" + item.Value);
                    break;

                case 26:
                    image = "CCB," + image;
                    item.Attributes.Add("id", "td_CCB_" + item.Value);
                    break;

                case 99:    //线下支付(转账,汇款)
                    image = "offline," + image;
                    item.Attributes.Add("id", "td_offline_" + item.Value);
                    break;

                case 100:    //货到付款
                    image = "100," + image;
                    item.Attributes.Add("id", "td_100_" + item.Value);
                    break;

                default:
                    item.Text = row["PayPlatName"].ToString();
                    break;
                }
                if (!string.IsNullOrEmpty(item.Value))
                {
                    DDLPayPlat.Items.Add(item);
                }
            }
            if (!string.IsNullOrEmpty(image))
            {
                function.Script(this, "createImage('/App_Themes/User/bankimg/','" + image.Trim(',') + "','" + ids.Trim(',') + "')");
            }
            DDLPayPlat.SelectedIndex = 0;
        }