示例#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);
        }
示例#2
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);
        }
示例#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);
        }
示例#4
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);
        }
示例#5
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);
        }
示例#6
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);
        }
示例#7
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);
        }
示例#8
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);
        }
示例#9
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);
        }
示例#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);
        }
示例#11
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);
        }
示例#12
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);
        }
示例#13
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);
        }
示例#14
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);
        }
示例#15
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);
        }
示例#16
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);
        }
示例#17
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);
        }
示例#18
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);
        }
示例#19
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);
        }
示例#20
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);
            }
        }
示例#21
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);
        }
示例#22
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);
        }