public static string PayBegin(string sChannel, string sPhone, string sAccount, decimal dPrice, int iCount, string gatewayId, string cardTypeCombine) { string sTranIP = ProvideCommon.GetRealIP(); string sOrderID = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP); //定单号; string itemName = string.Format("{0}武林币充值", (dPrice * 10).ToString()); return(PayDirect(sOrderID, dPrice, sAccount, itemName, gatewayId, cardTypeCombine)); }
public static string PayBegin(string sChannel, string sPhone, string sAccount, decimal dPrice, int iCount) { string sprec = string.Format("{0}/Pay/VCallBack.aspx", ProvideCommon.GetRootURI()); //换成商户接收地址 string spcustom = "wlb"; //需要 Server.UrlEncode编码 '客户自定义 30字符内 只能是数字、字母或数字字母的组合。不能用汉字。 string sTranIP = ProvideCommon.GetRealIP(); string sOrderID = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP); //定单号; return(PayDirect(sOrderID, sAccount, dPrice, spcustom, sprec)); }
public static string PayBegin(string sChannel, string sPhone, string sAccount, decimal dPrice, int iCount, HttpContext Context) { string return_url = string.Format("{0}/pay/TenCallBack.aspx", ProvideCommon.GetRootURI()); string sTranIP = ProvideCommon.GetRealIP(); string sOrderID = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP); string sPayType = "wlb"; return(PayDirect(sOrderID, sAccount, dPrice, sPayType, Context, return_url)); }
public static string PayDirect(string sChannel, string sPhone, string sAccount, decimal dPrice, int iCount, string sBankName) { string sTranIP = ProvideCommon.GetRealIP(); string out_trade_no = TransPBLL.PointSalesInit(sChannel, sPhone, sAccount, dPrice, iCount, sTranIP); //定单号; string body = string.Format("Dao50{0}元充值", dPrice.ToString()); //订单描述、订单详细、订单备注,显示在支付宝收银台里的“商品描述”里 string extra_common_param = sAccount; //自定义参数,可存放任何内容(除=、&等特殊字符外),不会显示在页面上 string sHtmlText = ParaCreate(out_trade_no, dPrice, sChannel, sBankName, sAccount, body, extra_common_param); return(sHtmlText); }
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); }
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); }