Beispiel #1
0
        bool login(Order order, ref CookieContainer cookie)
        {
            try
            {
                int loginCount = 0;
                while (loginCount < 5)
                {
                    cookie = new CookieContainer();

                    string result = PostAndGet.HttpGetString("http://login.sns.hongxiu.com/comlogin.aspx?url=http%3A//www.hongxiu.com/", "", ref cookie);

                    string             comLoginUrl        = "http://login.sns.hongxiu.com/comlogin.aspx?url=http://pay.hongxiu.com";
                    OrderChargeAccount orderChargeAccount = SQLOrderChargeAccount.GetChargeAccount(OrderChargeAccountType.HongXiu, false);
                    string             comLoginData       = "htmlUserName="******"&htmlPassword="******"&iskeeplogin=true&x=43&y=10&postcontent=";
                    result = PostAndGet.HttpPostString_HX(comLoginUrl, comLoginData, ref cookie, "login.sns.hongxiu.com", "http://pay.hongxiu.com/default.shtml");

                    result = PostAndGet.HttpGetString("http://pay.hongxiu.com/model/GetUserBaseInfo.aspx?roundmun=0.5841341522289687", "", ref cookie);

                    WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + orderChargeAccount.ChargeAccount + "||" + orderChargeAccount.ChargePassword
                                   + ",帐号登录返回:" + result, LogPathFile.Recharge);

                    if (result.Contains(orderChargeAccount.ChargeAccount))
                    {
                        return(true);
                    }
                    else
                    {
                        loginCount++;
                        Thread.Sleep(1 * 1000);
                    }
                }
                return(false);
            }
            catch (Exception)
            {
                return(false);
            }
        }
Beispiel #2
0
        bool ReCharge(Order order, int payNum, string payuid, CookieContainer cookie, ref string CardNumber, ref string status, ref string msg)
        {
            #region 参数提交

            string        ordercollectUrl = "http://pay.web.7k7k.com/ordercollect";
            StringBuilder ordercollectStr = new StringBuilder();
            ordercollectStr.AppendFormat("payuid={0}", payuid);
            ordercollectStr.AppendFormat("&paywhere={0}", "2");
            string result = PostAndGet.HttpPostString_HX(ordercollectUrl, ordercollectStr.ToString(), ref cookie, "pay.web.7k7k.com", "http://pay.web.7k7k.com/?qq-pf-to=pcqq.c2c");

            WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                           + ",订单第一步提交返回:" + result, LogPathFile.Recharge);

            string cid = Regex.Match(result, @"""cid"":""(.*?)"",").Groups[1].Value;

            Cards cards = SQLCards.GetChargeCards(OrderChargeAccountType.MMCard, payNum);
            if (cards == null)
            {
                status = "失败";
                msg    = "取卡失败||";
                return(true);
            }
            CardNumber = cards.CardNumber;


            string        payorderUrl = "http://pay.web.7k7k.com/payorder";
            StringBuilder payorderStr = new StringBuilder();

            payorderStr.AppendFormat("paywhere={0}", "2");
            payorderStr.AppendFormat("&paychannel={0}", "30");
            payorderStr.AppendFormat("&confirmusername={0}", order.TargetAccount);
            payorderStr.AppendFormat("&payuid={0}", payuid);
            payorderStr.AppendFormat("&gametext={0}", "1.%E9%80%89%E6%8B%A9%E6%B8%B8%E6%88%8F");
            payorderStr.AppendFormat("&gid={0}", "");
            payorderStr.AppendFormat("&servertext={0}", "2.%E9%80%89%E6%8B%A9%E5%8C%BA%E6%9C%8D");
            payorderStr.AppendFormat("&server_id={0}", "");
            payorderStr.AppendFormat("&cardnumber={0}", cards.CardNumber);
            payorderStr.AppendFormat("&cardpass={0}", cards.CardPassWord);
            payorderStr.AppendFormat("&kbyue={0}", "");
            payorderStr.AppendFormat("&passstatus={0}", "0");
            payorderStr.AppendFormat("&select_paytype={0}", "1");
            payorderStr.AppendFormat("&select_bank={0}", "ICBC-NET-B2C");
            payorderStr.AppendFormat("&category={0}", "1");
            payorderStr.AppendFormat("&cid={0}", cid);
            payorderStr.AppendFormat("&amt={0}", payNum);
            payorderStr.AppendFormat("&user_sta={0}", "true");

            result = PostAndGet.HttpPostString(payorderUrl, payorderStr.ToString(), ref cookie);
            WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                           + ",米米卡提交返回:" + result, LogPathFile.Recharge);


            if (result.Contains("充值失败"))
            {
                status = "失败";
                msg    = "充值失败(充值失败,请确认您的卡号密码后重试)||";

                cards.ReChargeStatus = (int)OrderRechargeStatus.untreated;
                cards.ReChargeMsg   += msg;
                SQLCards.UpdateCards_ByMultiple(cards);
                return(true);
            }
            else if (result.Contains("充值成功"))
            {
                status = "成功";
                msg    = cid + "充值成功||";

                cards.ReChargeStatus = (int)OrderRechargeStatus.successful;
                cards.ReChargeMsg   += msg;
                SQLCards.UpdateCards_ByMultiple(cards);
                return(true);
            }
            else if (result.Contains("米米卡余额不足"))
            {
                status = "失败";
                msg    = "余额不足||";

                cards.ReChargeStatus = (int)OrderRechargeStatus.failure;
                cards.ReChargeMsg   += msg;
                SQLCards.UpdateCards_ByMultiple(cards);
                return(true);
            }
            else if (result.Contains("提交失败"))
            {
                status = "失败";
                if (result.Contains("订单号重复"))
                {
                    msg = "订单号重复||";
                }
                else
                {
                    msg = "提交失败||";
                }

                cards.ReChargeStatus = (int)OrderRechargeStatus.untreated;
                cards.ReChargeMsg   += msg;
                SQLCards.UpdateCards_ByMultiple(cards);
                return(true);
            }
            else
            {
                status = "可疑";
                msg    = "充值存疑";

                cards.ReChargeStatus = (int)OrderRechargeStatus.suspicious;
                cards.ReChargeMsg   += msg;
                SQLCards.UpdateCards_ByMultiple(cards);
                return(false);
            }

            #endregion
        }
Beispiel #3
0
        public Order Charge(Order order)
        {
            try
            {
                decimal totalPrice      = (decimal)(order.BuyAmount * 2);
                decimal totalPriceFixed = totalPrice;
                int     isContinue      = 0;

                while (totalPrice > 0)
                {
                    #region 提交充值
                    int chargeVbiNum = 0;

                    if (isContinue > 3) //充值频繁,重试三次
                    {
                        break;
                    }

                    if (!GetChargeNum((int)totalPrice, ref chargeVbiNum))
                    {
                        break;
                    }
                    totalPrice = totalPrice - chargeVbiNum;


                    string          result = "";
                    CookieContainer cookie = new CookieContainer();

                    #region 帐号登录
                    result = PostAndGet.HttpGetString("http://pay.hongxiu.com/model/GetUserBaseInfo.aspx?roundmun=0.8916430823085395", "", ref cookie);
                    if (string.IsNullOrEmpty(result))
                    {
                        if (!login(order, ref cookie))
                        {
                            totalPrice       += chargeVbiNum;
                            order.RechargeMsg = "帐号登录失败";
                            continue;
                        }
                    }
                    #endregion

                    #region 获取参数 订单确认


                    result = PostAndGet.HttpGetString("http://pay.hongxiu.com/model/GetUserBaseInfo.aspx?roundmun=0.8916430823085395", "", ref cookie);
                    WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                                   + ",获取登录信息:" + result, LogPathFile.Recharge);

                    string [] arrLoginAccount = result.Split('|');
                    if (arrLoginAccount.Length < 2)
                    {
                        break;
                    }
                    string txtUserid   = arrLoginAccount[0];
                    string txtusername = arrLoginAccount[1];

                    result = PostAndGet.HttpGetString_HX("http://hxzz.hxcdn.net/?d=pay.hongxiu.com&hxid=" + txtUserid + "&f=/default.shtml&q=&aid=0&bid=0", "", ref cookie, "hxzz.hxcdn.net", "http://pay.hongxiu.com/default.shtml");

                    result = PostAndGet.HttpGetString_HX("http://pay.hongxiu.com/charge/guhua.shtml", "", ref cookie, "pay.hongxiu.com");
                    WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                                   + ",充值页面提交返回:" + result, LogPathFile.Recharge);

                    StringBuilder payTypeDataBuilder = new StringBuilder();
                    payTypeDataBuilder.AppendFormat("usertype={0}", "1");
                    payTypeDataBuilder.AppendFormat("&txtotherusername={0}", System.Web.HttpUtility.UrlEncode(order.TargetAccount, Encoding.UTF8));
                    payTypeDataBuilder.AppendFormat("&txtreotherusername={0}", System.Web.HttpUtility.UrlEncode(order.TargetAccount, Encoding.UTF8));
                    payTypeDataBuilder.AppendFormat("&txtuserid={0}", txtUserid);
                    payTypeDataBuilder.AppendFormat("&txtusername={0}", txtusername);
                    result = PostAndGet.HttpPostString_HX("http://pay.hongxiu.com/charge/cp.aspx?paytype=votev2", payTypeDataBuilder.ToString(), ref cookie, "pay.hongxiu.com");
                    WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                                   + ",订单第一步提交返回:" + result, LogPathFile.Recharge);

                    if (result.Contains("此用户不存在"))
                    {
                        order.RechargeStatus = (int)OrderRechargeStatus.failure;
                        order.RechargeMsg    = "此用户不存在";
                        return(order);
                    }

                    result = PostAndGet.HttpGetString("http://pay.hongxiu.com/charge/TelChargeV2.aspx", "", ref cookie, "http://pay.hongxiu.com/charge/cp.aspx?paytype=votev2");
                    WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                                   + ",订单第二步提交返回:" + result, LogPathFile.Recharge);

                    string __VIEWSTATE       = Regex.Match(result, @"id=""__VIEWSTATE"" value=""(.*?)""\s+/>").Groups [1].Value;
                    string __EVENTVALIDATION = Regex.Match(result, @"id=""__EVENTVALIDATION"" value=""(.*?)""\s+/>").Groups[1].Value;

                    StringBuilder chargeV2DataBuilder = new StringBuilder();
                    payTypeDataBuilder.AppendFormat("__VIEWSTATE={0}", __VIEWSTATE);
                    payTypeDataBuilder.AppendFormat("&__EVENTVALIDATION={0}", __EVENTVALIDATION);
                    payTypeDataBuilder.AppendFormat("&userid={0}", order.TargetAccount);
                    payTypeDataBuilder.AppendFormat("&btnSubmit={0}", "=%E6%8F%90++%E4%BA%A4");
                    payTypeDataBuilder.AppendFormat("&txtusername={0}", chargeVbiNum);
                    result = PostAndGet.HttpGetString("http://pay.hongxiu.com/charge/TelChargeV2.aspx", chargeV2DataBuilder.ToString(), ref cookie);
                    WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                                   + ",订单第二步确认提交返回:" + result, LogPathFile.Recharge);

                    result = PostAndGet.HttpGetString("http://pay.hongxiu.com/charge/ChargeStep3.aspx", "", ref cookie);
                    WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                                   + ",订单第三步提交返回:" + result, LogPathFile.Recharge);
                    //if (!result.Contains("充值确认"))
                    //{
                    //    totalPrice += chargeVbiNum;
                    //    continue;
                    //}

                    #endregion

                    #region Vbi钱包充值

                    string spid      = Regex.Match(result, @"name='spid'\s+value='(.*?)'>").Groups[1].Value;
                    string spname    = Regex.Match(result, @"name='spname'\s+value='(.*?)'>").Groups[1].Value;
                    string spoid     = Regex.Match(result, @"name='spoid'\s+value='(.*?)'>").Groups[1].Value;
                    string spreq     = Regex.Match(result, @"name='spreq'\s+value='(.*?)'>").Groups[1].Value;
                    string sprec     = Regex.Match(result, @"name='sprec'\s+value='(.*?)'>").Groups[1].Value;
                    string userid    = Regex.Match(result, @"name='userid'\s+value='(.*?)'>").Groups[1].Value;
                    string userip    = Regex.Match(result, @"name='userip'\s+value='(.*?)'>").Groups[1].Value;
                    string spmd5     = Regex.Match(result, @"name='spmd5'\s+value='(.*?)'>").Groups[1].Value;
                    string spcustom  = Regex.Match(result, @"name='spcustom'\s+value='(.*?)'>").Groups[1].Value;
                    string spversion = Regex.Match(result, @"name='spversion'\s+value='(.*?)'>").Groups[1].Value;
                    string money     = Regex.Match(result, @"name='money'\s+value='(.*?)'>").Groups[1].Value;
                    string urlcode   = Regex.Match(result, @"name='urlcode'\s+value='(.*?)'>").Groups[1].Value;

                    StringBuilder vnetonePostdataBuilder = new StringBuilder();
                    vnetonePostdataBuilder.AppendFormat("spid={0}", spid);
                    vnetonePostdataBuilder.AppendFormat("&spname={0}", System.Web.HttpUtility.UrlEncode(spname, Encoding.UTF8));
                    vnetonePostdataBuilder.AppendFormat("&spoid={0}", spoid);
                    vnetonePostdataBuilder.AppendFormat("&spreq={0}", System.Web.HttpUtility.UrlEncode(spreq, Encoding.UTF8));
                    vnetonePostdataBuilder.AppendFormat("&sprec={0}", System.Web.HttpUtility.UrlEncode(sprec, Encoding.UTF8));
                    vnetonePostdataBuilder.AppendFormat("&userid={0}", userid);
                    vnetonePostdataBuilder.AppendFormat("&userip={0}", userip);
                    vnetonePostdataBuilder.AppendFormat("&spmd5={0}", spmd5);
                    vnetonePostdataBuilder.AppendFormat("&spcustom={0}", System.Web.HttpUtility.UrlEncode(spcustom, Encoding.UTF8));
                    vnetonePostdataBuilder.AppendFormat("&spversion={0}", spversion);
                    vnetonePostdataBuilder.AppendFormat("&money={0}", money);
                    vnetonePostdataBuilder.AppendFormat("&urlcode={0}", urlcode);

                    OrderChargeAccount orderChargeAccount = SQLOrderChargeAccount.GetChargeAccount(OrderChargeAccountType.Vbi);
                    if (orderChargeAccount == null)
                    {
                        order.RechargeMsg += "未取到v币帐号||";
                        totalPrice++;
                        isContinue++;
                        continue;
                    }

                    result = VbiChargeHelper.VbiCharge(vnetonePostdataBuilder.ToString(), order, orderChargeAccount, cookie);
                    #endregion

                    #region 充值结果判断
                    if (result.Contains("成功") || result.Contains("您已成功充值"))
                    {
                        order.RechargeMsg         += "充值成功||";
                        order.SuccessfulAmount    += chargeVbiNum;
                        orderChargeAccount.Balance = orderChargeAccount.Balance - chargeVbiNum;
                        SQLOrderChargeAccount.UpdateChargeAccount(orderChargeAccount, false);
                    }
                    else if (result.Contains("请五分钟后再登陆商户网站进行帐户查询"))
                    {
                        order.RechargeMsg         += "充值成功(请五分钟后再登陆商户网站进行帐户查询)||";
                        order.SuccessfulAmount    += chargeVbiNum;
                        orderChargeAccount.Balance = orderChargeAccount.Balance - chargeVbiNum;
                        SQLOrderChargeAccount.UpdateChargeAccount(orderChargeAccount, false);
                    }
                    else if (result.Contains("操作失败"))
                    {
                        order.RechargeMsg += "操作失败||";
                        totalPrice        += chargeVbiNum;
                        SQLOrderChargeAccount.UpdateChargeAccount(orderChargeAccount, false);
                        isContinue++;
                    }
                    else if (result.Contains("充值过于频繁"))
                    {
                        order.RechargeMsg += "充值频繁||";
                        totalPrice        += chargeVbiNum;
                        SQLOrderChargeAccount.UpdateChargeAccount(orderChargeAccount, false);
                        isContinue++;
                    }
                    else if (result.Contains("验证码输入不正确"))
                    {
                        order.RechargeMsg += "验证码输入不正确||";
                        totalPrice        += chargeVbiNum;
                        SQLOrderChargeAccount.UpdateChargeAccount(orderChargeAccount, false);
                        isContinue++;
                    }
                    else if (result.Contains("账户余额不足"))
                    {
                        order.RechargeMsg += "账户余额不足||";
                        totalPrice        += chargeVbiNum;
                        SQLOrderChargeAccount.UpdateChargeAccount(orderChargeAccount, false, false);
                    }
                    else if (result.Contains("支付密码不正确"))
                    {
                        order.RechargeMsg += "支付密码不正确||";
                        totalPrice        += chargeVbiNum;
                        SQLOrderChargeAccount.UpdateChargeAccount(orderChargeAccount, false, false);
                    }
                    else if (result.Contains("用户不存在"))
                    {
                        order.RechargeMsg += "用户不存在||";
                        totalPrice        += chargeVbiNum;
                        SQLOrderChargeAccount.UpdateChargeAccount(orderChargeAccount, false, false);
                    }
                    else
                    {
                        order.RechargeMsg += "存疑||";
                        SQLOrderChargeAccount.UpdateChargeAccount(orderChargeAccount, false);
                    }
                    #endregion

                    #endregion
                }

                #region 订单状态判断
                if (order.SuccessfulAmount >= totalPriceFixed)
                {
                    order.RechargeStatus = (int)OrderRechargeStatus.successful;
                }
                else
                {
                    order.RechargeStatus = (int)OrderRechargeStatus.suspicious;
                }
                #endregion

                return(order);
            }
            catch (Exception ex)
            {
                order.RechargeStatus = (int)OrderRechargeStatus.suspicious;

                WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                               + ",充值一场信息:" + ex.Message, LogPathFile.Exception);

                return(order);
            }
        }
        string ReCharge(Order order, string Accounts, CookieContainer cookie)
        {
            #region 参数提交

            string        tradeverifyUrl = "https://pay.91y.com/tradeverify/";
            StringBuilder tradeverifyStr = new StringBuilder();
            tradeverifyStr.AppendFormat("user_qq={0}", "");
            tradeverifyStr.AppendFormat("&pay_User={0}", Accounts);
            tradeverifyStr.AppendFormat("&pd_FrpId={0}", "ZONGY-NET");
            tradeverifyStr.AppendFormat("&pay_amount={0}", (int)order.ProductParValue);
            tradeverifyStr.AppendFormat("&pay_type={0}", "5");
            tradeverifyStr.AppendFormat("&pay_subtype={0}", "0");
            tradeverifyStr.AppendFormat("&step={0}", "2");
            string result = PostAndGet.HttpPostString_HX(tradeverifyUrl, tradeverifyStr.ToString(), ref cookie, "pay.91y.com", "https://pay.91y.com/gamecard/");

            WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                           + ",订单第一步提交返回:" + result, LogPathFile.Recharge);

            if (result.Contains("无法继续充值"))
            {
                string msg = "充值已达每日上限";
                order.RechargeMsg = msg;
                return(msg);
            }

            if (result.Contains("用户不存在"))
            {
                string msg = "用户不存在";
                order.RechargeMsg = msg;
                return(msg);
            }

            if (result.Contains("所选金额会超出每日限额"))
            {
                string msg = "所选金额会超出每日限额";
                order.RechargeMsg = msg;
                return(msg);
            }

            if (result.Contains("订单提交失败"))
            {
                string msg = "订单提交失败";
                order.RechargeMsg = msg;
                return(msg);
            }

            #endregion

            #region 确认提交
            string pay_amount   = Regex.Match(result, @"id=""pay_amount""\s+name=""pay_amount""\s+value=""(.*?)""").Groups[1].Value;
            string pay_BankId   = Regex.Match(result, @"id=""pay_BankId""\s+name=""pay_BankId""\s+value=""(.*?)""").Groups[1].Value;
            string pay_ItemUser = Regex.Match(result, @"id=""pay_User""\s+name=""pay_ItemUser""\s+value=""(.*?)""").Groups[1].Value;
            string pay_UserID   = Regex.Match(result, @"id=""pay_UserID""\s+name=""pay_UserID""\s+value=""(.*?)""").Groups[1].Value;
            string pay_OrderId  = Regex.Match(result, @"id=""pay_OrderId""\s+name=""pay_OrderId""\s+value=""(.*?)""").Groups[1].Value;
            string pay_ItemName = Regex.Match(result, @"id=""pay_ItemName""\s+name=""pay_ItemName""\s+value=""(.*?)""").Groups[1].Value;
            string pay_Type     = Regex.Match(result, @"id=""pay_Type""\s+name=""pay_Type""\s+value=""(.*?)""").Groups[1].Value;
            string step         = Regex.Match(result, @"id=""pay_step""\s+name=""step""\s+value=""(.*?)""").Groups[1].Value;

            string servletUrl = "https://pay.91y.com/yeepay/Index.shtml";

            StringBuilder servletStr = new StringBuilder();
            servletStr.AppendFormat("pay_amount={0}", pay_amount);
            servletStr.AppendFormat("&pay_BankId={0}", pay_BankId);
            servletStr.AppendFormat("&pay_ItemUser={0}", pay_ItemUser);
            servletStr.AppendFormat("&pay_UserID={0}", pay_UserID);
            servletStr.AppendFormat("&pay_OrderId={0}", pay_OrderId);
            servletStr.AppendFormat("&pay_ItemName={0}", pay_ItemName);
            servletStr.AppendFormat("&pay_Type={0}", pay_Type);
            servletStr.AppendFormat("&step={0}", step);
            result = PostAndGet.HttpPostString(servletUrl, servletStr.ToString(), ref cookie);

            WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                           + ",订单第二步提交返回:" + result, LogPathFile.Recharge);

            if (!result.Contains("确认提交"))
            {
                string msg = "确认提交订单失败";
                order.RechargeMsg = msg;
                return(msg);
            }


            #endregion

            #region 纵游卡提交

            Cards cards = SQLCards.GetChargeCards(OrderChargeAccountType.ZYCard, (decimal)order.ProductParValue);

            if (cards == null)
            {
                string msg = "取卡失败";
                order.RechargeMsg = msg;
                return(msg);
            }

            string a         = "yeepay";
            string orderId   = Regex.Match(result, @"id=""pay_OrderId""\s+name=""pay_OrderId""\s+value=""(.*?)""").Groups[1].Value;
            string paymoney  = Regex.Match(result, @"id=""pay_amount""\s+name=""pay_amount""\s+value=""(.*?)""").Groups[1].Value;
            string cardType  = "ZONGY-NET";
            string payUser   = Regex.Match(result, @"id=""pay_User""\s+name=""pay_ItemUser""\s+value=""(.*?)""").Groups[1].Value;
            string payUserID = Regex.Match(result, @"id=""pay_UserID""\s+name=""pay_UserID""\s+value=""(.*?)""").Groups[1].Value;
            string cardId    = cards.CardNumber;
            string cardPsw   = cards.CardPassWord;
            string t         = "0.08686665393995474";

            string        yeepayUrl = "https://pay.91y.com/servlet/do.ashx";
            StringBuilder yeepayStr = new StringBuilder();
            yeepayStr.AppendFormat("a={0}", a);
            yeepayStr.AppendFormat("&orderId={0}", orderId);
            yeepayStr.AppendFormat("&paymoney={0}", paymoney);
            yeepayStr.AppendFormat("&cardType={0}", cardType);
            yeepayStr.AppendFormat("&payUser={0}", payUser);
            yeepayStr.AppendFormat("&payUserID={0}", payUserID);
            yeepayStr.AppendFormat("&cardId={0}", cardId);
            yeepayStr.AppendFormat("&cardPsw={0}", cardPsw);
            yeepayStr.AppendFormat("&t={0}", t);
            result = PostAndGet.HttpGetString(yeepayUrl, yeepayStr.ToString(), ref cookie, "https://pay.91y.com/yeepay/Index.shtml");

            WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                           + ",纵游卡提交返回:" + result, LogPathFile.Recharge);

            if (result.Contains("输入字符串的格式不正确"))
            {
                string msg = "输入字符串的格式不正确";
                order.RechargeMsg = msg;
                return(msg);
            }

            #endregion

            #region 查询卡密结果

            int queryCount = 0;
ReQuery:
            if (queryCount > 10)
            {
                string msg = "查询卡密充值结果超时";
                order.RechargeMsg = orderId + msg;

                SQLCards.UpdateCards_ByMultiple(cards, (int)OrderRechargeStatus.successful, orderId + msg);

                return(msg);
            }
            queryCount++;
            StringBuilder yeepaycheck = new StringBuilder();
            yeepaycheck.AppendFormat("a={0}", "yeepaycheck");
            yeepaycheck.AppendFormat("&orderId={0}", orderId);
            yeepaycheck.AppendFormat("&userID={0}", payUserID);
            yeepaycheck.AppendFormat("&t={0}", t);
            result = PostAndGet.HttpGetString(yeepayUrl, yeepaycheck.ToString(), ref cookie);

            WriteLog.Write("订单号:" + order.OrderInsideID + ",代充商品:" + order.ProductName + "代充帐号:" + order.TargetAccount
                           + ",纵游卡提交结果查询返回:" + result, LogPathFile.Recharge);

            if (result.Contains("充值失败"))
            {
                string msg = "充值失败(充值失败,请确认您的卡号密码后重试)";
                order.RechargeMsg = orderId + msg;;

                SQLCards.UpdateCards_ByMultiple(cards, (int)OrderRechargeStatus.successful, orderId + msg);

                return(msg);
            }
            else if (result.Contains("充值成功"))
            {
                string msg = "充值成功";
                order.RechargeMsg = orderId + msg;

                SQLCards.UpdateCards_ByMultiple(cards, (int)OrderRechargeStatus.successful, orderId + msg);
                return(msg);
            }
            else if (result.Contains("提交失败"))
            {
                string msg = "";

                if (result.Contains("订单号重复"))
                {
                    msg = "订单号重复||";
                }
                else
                {
                    msg = "订单提交失败||";
                }

                order.RechargeMsg = msg;

                SQLCards.UpdateCards_ByMultiple(cards, (int)OrderRechargeStatus.untreated, msg);

                return(msg);
            }
            else
            {
                System.Threading.Thread.Sleep(1000);
                goto ReQuery;
            }
            #endregion 查询卡密结果
        }