private string TxBuyItem(MallBuyPoint entity, string qqOpenid, string qqOpenkey, string qqPf, string platform, string itemId) { var url = AppsettingCache.Instance.GetAppSetting(EnumAppsetting.TxWb_ChargeUrl);//txh5_a8购买url //用 | 连接qqOpenid, qqOpenkey, qqPf, platform,nickName5个参数放在公共参数Common里 var str = ""; double cash = (double)entity.Cash; //金额单位转为 分 str = "qqopenid=" + qqOpenid + "&qqopenkey=" + qqOpenkey + "&qqpf=" + qqPf + "&platform=" + platform + "&itemid=" + itemId + "&count=" + entity.itemCount + "&gameOrderId=" + entity.OrderId + "&price=" + cash; return(UAHelper.HttpPost(url, str)); }
private string TxBuyItem(MallBuyPoint entity) { var url = AppsettingCache.Instance.GetAppSetting(EnumAppsetting.TxWb_ChargeUrl);//txh5_a8购买url //用 | 连接qqOpenid, qqOpenkey, qqPf, platform,nickName5个参数放在公共参数Common里 var strCommon = entity.StrCommon; var qqOpenid = ""; var qqOpenkey = ""; var qqPf = ""; var platform = ""; if (strCommon != null) { var strlist = strCommon.Split('|'); if (strlist.Length != 4) { return("-1"); } qqOpenid = strlist[0]; qqOpenkey = strlist[1]; qqPf = strlist[2]; platform = strlist[3]; } //拿配置的腾讯itemId var itemstr = AppsettingCache.Instance.GetAppSetting((EnumAppsetting)entity.ItemCode); var itemId = ""; var i = itemstr.Split('|'); try { if (platform.IndexOf("and") == -1) { itemId = i[1]; } else { itemId = i[0]; } } catch (Exception ex) { } var str = ""; double cash = (double)entity.Cash;//金额单位转为 分 str = "qqopenid=" + qqOpenid + "&qqopenkey=" + qqOpenkey + "&qqpf=" + qqPf + "&platform=" + platform + "&itemid=" + itemId + "&count=" + entity.itemCount + "&gameOrderId=" + entity.OrderId + "&price=" + cash; return(UAHelper.HttpPost(url, str)); }