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); }
public static string GiftToGame(int iUserID, string sGameAbbre, string sAccount, int iPoint, string sTranIP, string sChannelAbbre) { int iChannelID = ChannelBLL.ChannelIDSelByAbbre(sChannelAbbre); if (iChannelID < 20) { return("-3"); } string sGiftPointRes = TransPBLL.FirstGiftSend(iUserID, iPoint, sTranIP, iChannelID); string sRes = string.Empty; if (sGiftPointRes == "0") { string sGiftGameRes = PayAll.GamePay(sGameAbbre, iUserID, sAccount, iPoint, "", iUserID); if (sGiftGameRes.Split('|')[0] == "0") { sRes = "0"; } else { UserPointsBLL.UGiftPointUpdate(iUserID, 0); sRes = string.Format(string.Format("-2|{0}", sGiftGameRes)); } } else { sRes = string.Format("-1|{0}", sGiftPointRes); } return(sRes); }
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); }
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); }
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); }
/// <summary> /// 用户点数校验 /// </summary> /// <param name="iUserID"></param> /// <returns></returns> public static bool UPointCheck(int iUserID) { bool bRes = false; if (iUserID < 1000) { return(bRes); } int iUserPoints = UserPointsBLL.UPointSel(iUserID); if (iUserPoints == 0) { bRes = true; return(bRes); } int iPoints = URealPointsSel(iUserID);//用户实际点数 if (iPoints == -1) { return(bRes); } if (iUserPoints != -1 && iPoints != -1) { if (iUserPoints > iPoints) { if (iPoints < 0) { iPoints = 0; } int iRes = UserPointsDAL.UPointUpdate(iUserID, iPoints); if (iRes > 0) { bRes = true; } } else { bRes = true; } } return(bRes); }
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); }
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); }
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); }
public static string GiftToGame(int iUserID, string sGameAbbre, string sAccount, int iPoint, string sTranIP) { string sRes = string.Empty; string sGiftPointRes = TransPBLL.GiftPointsSend(iUserID, iPoint, sTranIP); if (sGiftPointRes == "0") { string sGiftGameRes = PayAll.GamePay(sGameAbbre, iUserID, sAccount, iPoint, "", iUserID); if (sGiftGameRes.Split('|')[0] == "0") { sRes = "0"; } else { UserPointsBLL.UGiftPointUpdate(iUserID, 0); sRes = string.Format(string.Format("-2|{0}", sGiftGameRes)); } } else { sRes = string.Format("-1|{0}", sGiftPointRes); } return(sRes); }