Ejemplo n.º 1
0
        public static string gcldPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            string  sPlayerID = GetPlayID(iGUserID.ToString(), sGameAbbre);
            decimal dMoney    = (Convert.ToDecimal(iPayPoints)) / 10;
            string  sTranIP   = ProvideCommon.GetRealIP();
            string  sTranID   = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string  sTGRes    = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes    = Pay(iGUserID.ToString(), dMoney, sTranID, sGameAbbre, sPlayerID);
            string sReturn = string.Empty;

            if (sRes == "{\"state\":1,\"data\":1}" || sRes == "{\"state\":0,\"data\":5}")
            {
                sReturn = string.Format("0|{0}", sTranID);
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
Ejemplo n.º 2
0
        public static string yqdxPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            int    iMoney  = iPayPoints / 10;
            string sTranIP = ProvideCommon.GetRealIP();
            string sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string otype   = "1";//订单类型(0,直接充值,1虚拟币兑换)
            string sRes    = Pay(iGUserID.ToString(), iMoney, sTranID, sGameAbbre, sTranIP, otype);
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "1":
                sReturn = string.Format("0|{0}", sTranID);
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Ejemplo n.º 3
0
        public static string wssgQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int    iUserID = UserBll.UserIDSel(sUserName);
            string sRes    = Pay(iUserID.ToString(), dPrice, sTranID, sGameAbbre);
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "1":
                int iGRes = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                if (iGRes == 0)
                {
                    sReturn = "0";
                }
                else
                {
                    sReturn = "-1";
                }
                int iPoint    = Convert.ToInt32(dPrice) * 10;
                int iServerID = int.Parse(GetServerID(sGameAbbre));
                GamePaySucBLL.GamePaySucAdd(iUserID, iUserID, iPoint, sTranID, "wssg", iServerID);
                break;

            case "2":
                sReturn = "0";
                TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Ejemplo n.º 4
0
        public static string sgljPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            int    iMoney  = iPayPoints / 10;
            string sTranIP = ProvideCommon.GetRealIP();
            string sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes = Pay(iGUserID.ToString(), iMoney, sTranID, sGameAbbre);

            ///成功返回0|订单号,失败返回游戏失败结果
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "0":
            case "-6":
                sReturn = string.Format("0|{0}", sTranID);
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Ejemplo n.º 5
0
        public static string gcldQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int iUserID     = UserBll.UserIDSel(sUserName);
            int iUserPoints = UserPointsBLL.UPointSel(iUserID);
            int iGamePoints = Convert.ToInt32(dPrice * 10);

            if (iUserPoints < iGamePoints)
            {
                return("-2");
            }
            string sUserID   = iUserID.ToString();
            string sPlayerID = GetPlayID(sUserID, sGameAbbre);
            string sRes      = Pay(sUserID, dPrice, sTranID, sGameAbbre, sPlayerID);
            string sReturn   = string.Empty;

            if (sRes == "{\"state\":1,\"data\":1}" || sRes == "{\"state\":0,\"data\":5}")
            {
                int iGRes = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                if (iGRes == 0)
                {
                    sReturn = "0";
                }
                else
                {
                    sReturn = "-1";
                }
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
Ejemplo n.º 6
0
        public static string nzQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int    iUserID = UserBll.UserIDSel(sUserName);
            string sRes    = Pay(iUserID.ToString(), dPrice, sTranID, sGameAbbre);
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "success":
                int iGRes = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                if (iGRes == 0)
                {
                    sReturn = "0";
                }
                else
                {
                    sReturn = "-1";
                }
                break;

            case "err_repeat":
                sReturn = "0";
                TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Ejemplo n.º 7
0
        public static string jdsjPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            int    iMoney  = iPayPoints / 10;
            string sTranIP = ProvideCommon.GetRealIP();
            string sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes    = Pay(iGUserID.ToString(), iMoney, sTranID, sGameAbbre);
            string sReturn = string.Empty;

            try
            {
                JSONObject json   = JSONConvert.DeserializeObject(sRes);
                string     status = json["status"].ToString();
                if (status == "400")
                {
                    sReturn = string.Format("0|{0}", sTranID);
                }
                else
                {
                    sReturn = sRes;
                }
            }
            finally
            {
                JSONConvert.clearJson();
            }
            return(sReturn);
        }
Ejemplo n.º 8
0
        public static string khbdPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            int    iMoney  = iPayPoints / 10;
            string sTranIP = ProvideCommon.GetRealIP();
            string sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes     = Pay(iGUserID.ToString(), iMoney, sTranID, sGameAbbre);
            string sPayCode = ProvideCommon.getJsonValue("code", sRes);
            string sReturn  = string.Empty;

            if (sPayCode == "0" || sPayCode == "2")
            {
                sReturn = string.Format("0|{0}", sTranID);
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
Ejemplo n.º 9
0
        public static string khbdQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int iUserID     = UserBll.UserIDSel(sUserName);
            int iUserPoints = UserPointsBLL.UPointSel(iUserID);
            int iGamePoints = Convert.ToInt32(dPrice * 10);

            if (iUserPoints < iGamePoints)
            {
                return("-2");
            }
            string sRes     = Pay(iUserID.ToString(), dPrice, sTranID, sGameAbbre);
            string sPayCode = ProvideCommon.getJsonValue("code", sRes);
            string sReturn  = string.Empty;

            if (sPayCode == "0" || sPayCode == "2")
            {
                int iGRes = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                if (iGRes == 0)
                {
                    sReturn = "0";
                }
                else
                {
                    sReturn = "-1";
                }
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
Ejemplo n.º 10
0
        public static string jjpQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int    iUserID = UserBll.UserIDSel(sUserName);
            string sRes    = Pay(iUserID.ToString(), dPrice, sTranID, sGameAbbre);
            string sress   = ProvideCommon.getJsonValue("code", sRes).Trim();
            string sReturn = string.Empty;

            switch (sress)
            {
            case "1000":
                int iGRes = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                if (iGRes == 0)
                {
                    sReturn = "0";
                }
                else
                {
                    sReturn = "-1";
                }
                break;

            //case "4":
            //    TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
            //    sReturn = "0";
            //    break;
            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Ejemplo n.º 11
0
        public static string Pay(string sUserID, decimal dMoney, string sOrderID, string sGame, string playerId)
        {
            string        yx        = "dao50";//运营商标识
            string        userid    = sUserID;
            string        sTranTime = TransGBLL.TransTimeSelByTID(sOrderID);
            string        orderId   = ProvideCommon.getTime(DateTime.Parse(sTranTime)).ToString();
            int           iGold     = Convert.ToInt32(dMoney * 10);
            string        gold      = iGold.ToString();
            string        tp        = ProvideCommon.getTime().ToString();
            string        payKey    = "##$~@@(dao50::PAY)@@RMd3YAtihg5GhO6LsU";
            StringBuilder sbText    = new StringBuilder();

            sbText.Append(yx);
            sbText.Append(userid);
            sbText.Append(orderId);
            sbText.Append(gold);
            sbText.Append(tp);
            sbText.Append(payKey);
            string ticket      = ProvideCommon.MD5(sbText.ToString());//yx+userId+orderId+gold+tp+payKey
            string sGamePayUrl = string.Format("http://{0}/yx/pay?yx={1}&userId={2}&playerId={3}&orderId={4}&gold={5}&tp={6}&ticket={7}",
                                               ServerHost(sGame), yx, userid, playerId, orderId, gold, tp, ticket);
            string sRes    = ProvideCommon.GetPageInfo(sGamePayUrl);
            string sTranIP = ProvideCommon.GetRealIP();
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            GamePayBLL.GamePayAdd(sTranIP, sGamePayUrl, sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Ejemplo n.º 12
0
        public static string yjxyQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int    iUserID  = UserBll.UserIDSel(sUserName);
            string sRes     = Pay(iUserID.ToString(), dPrice, sTranID, sGameAbbre);
            string sJsonRes = ProvideCommon.getJsonValue("ret", sRes);
            string sReturn  = string.Empty;

            switch (sJsonRes)
            {
            case "0":
                int iGRes = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                if (iGRes == 0)
                {
                    sReturn = "0";
                }
                else
                {
                    sReturn = "-1";
                }
                break;

            case "2":
                TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                sReturn = "0";
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Ejemplo n.º 13
0
        public static string zsgQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int iUserID     = UserBll.UserIDSel(sUserName);
            int iUserPoints = UserPointsBLL.UPointSel(iUserID);
            int iGamePoints = Convert.ToInt32(dPrice * 10);

            if (iUserPoints < iGamePoints)
            {
                return("-2");
            }
            string sRes    = Pay(iUserID.ToString(), dPrice, sTranID, sGameAbbre);
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "1":
            case "-6":
                int iGRes = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                if (iGRes == 0)
                {
                    sReturn = "0";
                }
                else
                {
                    sReturn = "-1";
                }
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Ejemplo n.º 14
0
        public static string zsgPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            decimal dMoney  = Convert.ToDecimal(iPayPoints / 10);
            string  sTranIP = ProvideCommon.GetRealIP();
            string  sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string  sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes    = Pay(iGUserID.ToString(), dMoney, sTranID, sGameAbbre);
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "1":
            case "-6":
                sReturn = string.Format("0|{0}", sTranID);
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Ejemplo n.º 15
0
        public static string jyPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            decimal dMoney  = (Convert.ToDecimal(iPayPoints)) / 10;
            string  sTranIP = ProvideCommon.GetRealIP();
            string  sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string  sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes    = Pay(iGUserID.ToString(), dMoney, sTranID, sGameAbbre);
            string sReturn = string.Empty;
            string intRes  = ProvideCommon.getJsonValue("status", sRes).Trim();

            if (intRes == "1")
            {
                sReturn = string.Format("0|{0}", sTranID);
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
Ejemplo n.º 16
0
        public static string QuickPay(string sChannel, string sPhone, string sAccount, decimal dPrice, int iCount, string sBankName, string sGameNameC)
        {
            string sTranIP     = ProvideCommon.GetRealIP();
            string sTranDirect = string.Empty;
            string sGameName   = sGameNameC.Split('|')[0];

            switch (sChannel)
            {
            case "alipay":
            case "ibank":
                string  sPTranID    = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP);
                decimal dFeeScale   = ChannelBLL.FeeScaleSel(sChannel);
                int     iGamePoints = Convert.ToInt32(dPrice * 10 * dFeeScale);
                int     iPayUserID  = UserBll.UserIDSel(sAccount);
                string  sGTranID    = TransGBLL.GameSalesInit(sGameName, iGamePoints, sAccount, sPhone, iPayUserID, sTranIP);
                TranQuickBLL.TranQuickAdd(sGTranID, sPTranID);
                sTranDirect = AliPay.QuickPayDirect(sPTranID, dPrice, sChannel, sBankName, sAccount, sGameNameC);
                break;

            case "yp-szx":
            case "yp-dx":
            case "yp-lt":
            case "yp-zt":
            case "yp-sd":
            case "yp-jcard":
            case "yp-bank":
                sTranDirect = YeePayBuy.QuickPayDirect(sChannel, sPhone, sAccount, dPrice, iCount, sGameNameC);
                break;

            case "szfbank":
                string sTranID = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP);
                dFeeScale   = ChannelBLL.FeeScaleSel(sChannel);
                iGamePoints = Convert.ToInt32(dPrice * 10 * dFeeScale);
                iPayUserID  = UserBll.UserIDSel(sAccount);
                sGTranID    = TransGBLL.GameSalesInit(sGameName, iGamePoints, sAccount, sPhone, iPayUserID, sTranIP);
                TranQuickBLL.TranQuickAdd(sGTranID, sTranID);
                sTranDirect = QdbPayBuy.QuickPayBegin(sTranID, sAccount, dPrice, sGameNameC);
                break;

            case "vpay":
                string sOrderID = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP);
                dFeeScale   = ChannelBLL.FeeScaleSel(sChannel);
                iGamePoints = Convert.ToInt32(dPrice * 10 * dFeeScale);
                iPayUserID  = UserBll.UserIDSel(sAccount);
                sGTranID    = TransGBLL.GameSalesInit(sGameName, iGamePoints, sAccount, sPhone, iPayUserID, sTranIP);
                TranQuickBLL.TranQuickAdd(sGTranID, sOrderID);
                sTranDirect = VPayBuy.QuickPayBegin(sOrderID, sAccount, dPrice, sGameNameC);
                break;
            }
            return(sTranDirect);
        }
Ejemplo n.º 17
0
        public static string Pay(string sUserID, int iMoney, string sOrderID, string sGame)
        {
            string        key          = "f06b9a55978836e041d174a616ebba25";
            string        unionCode    = "unionhysjdaowulin";
            string        sTranTime    = TransGBLL.TransTimeSelByTID(sOrderID);
            string        orderId      = ProvideCommon.getTime(DateTime.Parse(sTranTime)).ToString();
            string        userName     = HttpUtility.UrlEncode(sUserID);
            string        chargeTime   = DateTime.Now.ToString("yyyyMMddHHmmss");
            string        chargeMoney  = iMoney.ToString("f2");
            int           iGamePoints  = iMoney * 10;
            string        chargeAmount = iGamePoints.ToString();
            string        Gatewayid    = GetPaySeverID(sGame);
            string        Gameid       = "820";
            string        clientIp     = ProvideCommon.GetRealIP();
            StringBuilder sbText       = new StringBuilder();

            sbText.Append(unionCode);
            sbText.Append(orderId);
            sbText.Append(userName);
            sbText.Append(chargeTime);
            sbText.Append(chargeMoney);
            sbText.Append(chargeAmount);
            sbText.Append(Gatewayid);
            sbText.Append(Gameid);
            sbText.Append(key);
            string sign = ProvideCommon.MD5(sbText.ToString());//小写英文字母与数字组合,md5(unionCode+orderId+userName+chargeTime+chargeMoney+chargeAmount+gatewayId+gameId+key)注意:chargeMoney 参与md5 计算时应保留小数点两位,例如35 应该转换为35.00。key 由蓝港在线生成,告知联运方。

            sbText.Remove(0, sbText.Length);
            string serverdomain = GetDomain(sGame);
            string TranURL      = "http://59.151.39.189:8080/union_mid/charging.do";

            sbText.Append(TranURL);
            sbText.AppendFormat("?unionCode={0}&", unionCode);
            sbText.AppendFormat("orderId={0}&", orderId);
            sbText.AppendFormat("userName={0}&", userName);
            sbText.AppendFormat("chargeTime={0}&", chargeTime);
            sbText.AppendFormat("chargeMoney={0}&", chargeMoney);
            sbText.AppendFormat("chargeAmount={0}&", chargeAmount);
            sbText.AppendFormat("gatewayId={0}&", Gatewayid);
            sbText.AppendFormat("gameId={0}&", Gameid);
            sbText.AppendFormat("clientIp={0}&", clientIp);
            sbText.AppendFormat("sign={0}", sign);
            string sRes    = ProvideCommon.GetPageInfo(sbText.ToString());
            int    iUserID = 0;

            int.TryParse(sUserID, out iUserID);
            string user_ip = ProvideCommon.GetRealIP();

            GamePayBLL.GamePayAdd(user_ip, sbText.ToString(), sOrderID, sRes, sGame, iUserID);
            return(sRes);
        }
Ejemplo n.º 18
0
        public static string dntgQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int    iUserID = UserBll.UserIDSel(sUserName);
            string sRes    = Pay(iUserID.ToString(), dPrice, sTranID, sGameAbbre);
            string sReturn = string.Empty;

            if (sRes.IndexOf("recv=ok") > -1)
            {
                TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                sReturn = "0";
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
Ejemplo n.º 19
0
        public static string jyQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int    iUserID = UserBll.UserIDSel(sUserName);
            string sRes    = Pay(iUserID.ToString(), dPrice, sTranID, sGameAbbre);
            string sReturn = string.Empty;
            string intRes  = ProvideCommon.getJsonValue("status", sRes).Trim();

            if (intRes == "1")
            {
                TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                sReturn = "0";
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
Ejemplo n.º 20
0
        public static string fswd2QucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int iUserID     = UserBll.UserIDSel(sUserName);
            int iUserPoints = UserPointsBLL.UPointSel(iUserID);
            int iGamePoints = Convert.ToInt32(dPrice * 10);

            if (iUserPoints < iGamePoints)
            {
                return("-2");
            }
            string sRes    = Pay(iUserID.ToString(), dPrice, sTranID, sGameAbbre);
            string sReturn = PayResult(sRes);

            if (sReturn == "0")
            {
                TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
            }
            return(sReturn);
        }
Ejemplo n.º 21
0
        public static string LJQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int iMoney      = Convert.ToInt32(dPrice * 100);//单位:分;充值100元,给用户加1000金币0礼卷0铜币
            int iUserID     = UserBll.UserIDSel(sUserName);
            int iUserPoints = UserPointsBLL.UPointSel(iUserID);
            int iGamePoints = iMoney / 10;

            if (iUserPoints < iGamePoints)
            {
                return("-2");
            }
            string sPayRes = Pay(iUserID.ToString(), iMoney, sTranID, sGameAbbre);
            string sRes    = GetReturn(sPayRes);
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "0":
                int iGRes = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                if (iGRes == 0)
                {
                    sReturn = "0";
                }
                else
                {
                    sReturn = "-1";
                }
                break;

            case "-5":
            case "-8":
                TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                sReturn = "0";
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Ejemplo n.º 22
0
        public static string jdsjQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int iMoney      = Convert.ToInt32(dPrice);
            int iUserID     = UserBll.UserIDSel(sUserName);
            int iUserPoints = UserPointsBLL.UPointSel(iUserID);
            int iGamePoints = iMoney * 10;

            if (iUserPoints < iGamePoints)
            {
                return("-2");
            }
            string sRes    = Pay(iUserID.ToString(), iMoney, sTranID, sGameAbbre);
            string sReturn = string.Empty;

            try
            {
                JSONObject json   = JSONConvert.DeserializeObject(sRes);
                string     status = json["status"].ToString();
                if (status == "400")
                {
                    int iGRes = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                    if (iGRes == 0)
                    {
                        sReturn = "0";
                    }
                    else
                    {
                        sReturn = "-1";
                    }
                }
                else
                {
                    sReturn = sRes;
                }
            }
            finally
            {
                JSONConvert.clearJson();
            }
            return(sReturn);
        }
Ejemplo n.º 23
0
        public static string sqQuickPay(string sGameAbbre, string sUserName, decimal dPirce, string sTranID, string sRoleID)
        {
            if (!TransGBLL.TranIDVal(sTranID))
            {
                return("traniderr");
            }
            int iState = TransGBLL.TranIDStateSel(sTranID);

            if (iState == 1)
            {
                return("0");
            }
            else if (iState != 0)
            {
                return(string.Format("state:{0}", iState));
            }
            string sReturn = string.Empty;

            sReturn = sqGame.sqQucikPay(sGameAbbre, sUserName, dPirce, sTranID, sRoleID);
            return(sReturn);
        }
Ejemplo n.º 24
0
        public static string fswd2Pay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            decimal dMoney  = (Convert.ToDecimal(iPayPoints)) / 10;
            string  sTranIP = ProvideCommon.GetRealIP();
            string  sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string  sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes = PayResult(Pay(iGUserID.ToString(), dMoney, sTranID, sGameAbbre));

            if (sRes == "0")
            {
                return(string.Format("0|{0}", sTranID));
            }
            else
            {
                return(sRes);
            }
        }
Ejemplo n.º 25
0
        public static void gamepaysend(string sGTranID)
        {
            TransG tgObject = TransGBLL.UserTranSel(sGTranID);
            string sReturn  = string.Empty;

            if (tgObject.state == 1)
            {
                string        sUrl   = "http://union.dao50.com/tarns/transGame.aspx";
                int           price  = tgObject.TranPoints / 10;
                StringBuilder sbText = new StringBuilder();
                sbText.AppendFormat("orderid={0}&", tgObject.TranID.Trim());
                sbText.AppendFormat("userid={0}&", tgObject.UserID);
                sbText.AppendFormat("gameid={0}&", tgObject.GameID);
                sbText.AppendFormat("ordertime={0}&", tgObject.TranTime);
                sbText.AppendFormat("gameuserid={0}&", tgObject.GUserID);
                sbText.AppendFormat("price={0}&", price.ToString());
                sbText.AppendFormat("points={0}&", tgObject.TranPoints);
                sbText.AppendFormat("giftpoints={0}&", tgObject.TranGiftPoints);
                sbText.AppendFormat("tranip={0}", tgObject.TranIP);
                sReturn = string.Format("{0}?{1}", sUrl, sbText.ToString());
            }
            ProvideCommon.GetPageInfo(sReturn);
        }
Ejemplo n.º 26
0
        /// <summary>
        /// 用户真实点数查询
        /// </summary>
        /// <param name="iUserID"></param>
        /// <returns></returns>
        public static int URealPointsSel(int iUserID)
        {
            int iPoints = 0;

            if (iUserID > 999)
            {
                int iPPoints = TransPBLL.TranPSelPointsByUser(iUserID);
                int iGPoints = TransGBLL.TransSelGPointsByUser(iUserID);
                if (iPPoints == -1 || iGPoints == 1)
                {
                    iPoints = -1;
                }
                else
                {
                    iPoints = iPPoints + iGPoints;
                }
            }
            else
            {
                iPoints = -1;
            }
            return(iPoints);
        }
Ejemplo n.º 27
0
        public static string dntgPay(string sGameAbbre, int iUserID, string sUserName, int iPayPoints, string sPhone, int iGUserID)
        {
            decimal dMoney  = (Convert.ToDecimal(iPayPoints)) / 10;
            string  sTranIP = ProvideCommon.GetRealIP();
            string  sTranID = TransGBLL.GameSalesInit(sGameAbbre, iPayPoints, sUserName, sPhone, iGUserID, sTranIP);
            string  sTGRes  = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre).ToString();

            if (sTGRes != "0")
            {
                return(sTGRes);
            }
            string sRes    = Pay(iGUserID.ToString(), dMoney, sTranID, sGameAbbre);
            string sReturn = string.Empty;

            if (sRes.IndexOf("recv=ok") > -1)
            {
                sReturn = string.Format("0|{0}", sTranID);
            }
            else
            {
                sReturn = sRes;
            }
            return(sReturn);
        }
Ejemplo n.º 28
0
        public static string yqdxQucikPay(string sGameAbbre, string sUserName, decimal dPrice, string sTranID)
        {
            int iMoney      = Convert.ToInt32(dPrice);
            int iUserID     = UserBll.UserIDSel(sUserName);
            int iUserPoints = UserPointsBLL.UPointSel(iUserID);
            int iGamePoints = iMoney * 10;

            if (iUserPoints < iGamePoints)
            {
                return("-2");
            }
            string sTranIP = ProvideCommon.GetRealIP();
            string otype   = "0";//订单类型(0,直接充值,1虚拟币兑换)
            string sRes    = Pay(iUserID.ToString(), iMoney, sTranID, sGameAbbre, sTranIP, otype);
            string sReturn = string.Empty;

            switch (sRes)
            {
            case "1":
                int iGRes = TransGBLL.GameSalesCommit(sTranID, sUserName, sGameAbbre);
                if (iGRes == 0)
                {
                    sReturn = "0";
                }
                else
                {
                    sReturn = "-1";
                }
                break;

            default:
                sReturn = sRes;
                break;
            }
            return(sReturn);
        }
Ejemplo n.º 29
0
        public static string GameQuickPay(string sGameAbbre, string sUserName, decimal dPirce, string sTranID)
        {
            if (!TransGBLL.TranIDVal(sTranID))
            {
                return("traniderr");
            }
            int iState = TransGBLL.TranIDStateSel(sTranID);

            if (iState == 1)
            {
                return("0");
            }
            else if (iState != 0)
            {
                return(string.Format("state:{0}", iState));
            }
            string sReturn = string.Empty;
            string sGame   = GameInfoBLL.GameInfoAbbreSel(sGameAbbre).TrimEnd();

            switch (sGame)
            {
            case "sssg":
                sReturn = sssgGame.sssgQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "sxd":
                sReturn = sxdGame.sxdQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "lj":
                sReturn = ljGame.LJQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "dxz":
                sReturn = dxzGame.dxzQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "djj":
                sReturn = djjGame.djjQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "txj":
                sReturn = txjGame.txjQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "sjsg":
                sReturn = sjsgGame.sjsgQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "tzcq":
                sReturn = tzcqGame.tzcqQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "by":
                sReturn = byGame.byQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "swjt":
                sReturn = swjtGame.swjtQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "gcld":
                sReturn = gcldGame.gcldQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "khbd":
                sReturn = khbdGame.khbdQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "hyjft":
                sReturn = hyjftGame.hyjftQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "nslm":
                sReturn = nslmGame.nslmQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "yjxy":
                sReturn = yjxyGame.yjxyQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "dtgzt":
                sReturn = tgztGame.tgztQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "mhxy":
                sReturn = mhxyGame.mhxyQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "qxz":
                sReturn = qxzGame.qxzQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "qszg":
                sReturn = qszgGame.qszgQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "wwsg":
                sReturn = wwsgGame.wwsgQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "dntg":
                sReturn = dntgGame.dntgQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "jy":
                sReturn = jyGame.jyQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "sskc":
                sReturn = sskcGame.jyQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "ktpd":
                sReturn = ktpdGame.ktpdQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "mhtj":
                sReturn = mhtjGame.mhtjQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "jjp":
                sReturn = jjpGame.jjpQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "sgyjz":
                sReturn = sgyjzGame.sgyjzQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "dtgzter":
                sReturn = tgzt2Game.tgztQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;

            case "zwx":
                sReturn = zwxGame.zwxQucikPay(sGameAbbre, sUserName, dPirce, sTranID);
                break;
            }
            return(sReturn);
        }