コード例 #1
0
ファイル: PayAll.cs プロジェクト: bin1123/webgamesite
        public static string CreatePay(string sChannel, string sPhone, string sAccount, decimal dPrice, int iCount, string sBankName)
        {
            string sTranDirect = string.Empty;

            switch (sChannel)
            {
            case "alipay":
            case "ibank":
                sTranDirect = AliPay.PayDirect(sChannel, sPhone, sAccount, dPrice, iCount, sBankName);
                break;

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

            case "szfbank":
                sTranDirect = QdbPayBuy.PayBegin(sChannel, sPhone, sAccount, dPrice, iCount);
                break;

            case "vpay":
                sTranDirect = VPayBuy.PayBegin(sChannel, sPhone, sAccount, dPrice, iCount);
                break;
            }
            return(sTranDirect);
        }
コード例 #2
0
ファイル: PayAll.cs プロジェクト: bin1123/webgamesite
        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);
        }