Exemple #1
0
        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);
        }
Exemple #2
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 #3
0
        public static string PayBegin(string sChannel, string sPhone, string sAccount, decimal dPrice, int iCount)
        {
            string        sTranIP  = ProvideCommon.GetRealIP();
            string        p2_Order = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP);//订单号
            string        sPoints  = (dPrice * 10).ToString();
            StringBuilder sbText   = new StringBuilder();

            sbText.Append("到武林");
            sbText.Append(sPoints);
            sbText.Append("武林币");
            string p5_Pid   = sbText.ToString(); //商品名称
            string pd_FrpID = string.Empty;      //充值方式编码

            switch (sChannel)
            {
            case "yp-szx":
                pd_FrpID = "SZX-NET";
                break;

            case "yp-dx":
                pd_FrpID = "TELECOM-NET";
                break;

            case "yp-lt":
                pd_FrpID = "UNICOM-NET";
                break;

            case "yp-zt":
                pd_FrpID = "ZHENGTU-NET";
                break;

            case "yp-sd":
                pd_FrpID = "SNDACARD-NET";
                break;

            case "yp-jcard":
                pd_FrpID = "JUNNET-NET";
                break;

            case "yp-bank":
                pd_FrpID = "";
                break;
            }
            string pa_MP    = sAccount;
            string p8_Url   = string.Format("{0}/pay/YeeCallback.aspx", ProvideCommon.GetRootURI());
            string sTranUrl = YeePayBuy.CreateBuyUrl(p2_Order, dPrice.ToString(), sPoints, pa_MP, pd_FrpID, p8_Url);

            FirstOfPayPointBLL.Add(p2_Order, sTranIP, sTranUrl);
            return(sTranUrl);
        }