Exemple #1
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);
        }
Exemple #2
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);
        }
Exemple #3
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);
        }
Exemple #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);
        }
Exemple #5
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);
        }
Exemple #6
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);
        }
Exemple #7
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);
        }
Exemple #8
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);
        }
Exemple #9
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);
            }
        }
Exemple #10
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);
        }