Exemple #1
0
        private MessageCode LoginCheckNew(string openid, string state, string serverId, string nowTimestamp, string pf,
                                          string sessionId, string sign, string qqOpenid, string qqOpenkey, string qqPf, string platform)
        {
            if (string.IsNullOrEmpty(openid) ||
                string.IsNullOrEmpty(state) ||
                string.IsNullOrEmpty(serverId) ||
                string.IsNullOrEmpty(nowTimestamp) ||
                string.IsNullOrEmpty(pf) ||
                string.IsNullOrEmpty(sessionId) ||
                string.IsNullOrEmpty(sign) ||
                string.IsNullOrEmpty(qqOpenid) ||
                string.IsNullOrEmpty(qqOpenkey) ||
                string.IsNullOrEmpty(qqPf) ||
                string.IsNullOrEmpty(platform))
            {
                return(MessageCode.LoginError);
            }

            if (nowTimestamp.IndexOf(' ') >= 0)
            {
                var times = nowTimestamp.Split(' ');
                if (times.Length > 0)
                {
                    nowTimestamp = times[0];
                }
            }
            var channelAliasEntity = UAFactory.Instance.GetPlatform("" + A8csdkEnum.txh5_a8); //枚举参数修改腾讯key

            if (channelAliasEntity == null)
            {
                return(MessageCode.LoginError);
            }
            //md5(openid+state+serverId+nowTimestamp+pf+sessionId+nickName+md5Key).tolowcase()
            string cryptKey     = channelAliasEntity.LoginKey;
            string signParam    = "";
            string signserverId = "default";

            signParam =
                CryptHelper.GetMD5(openid + state + signserverId + nowTimestamp + pf + sessionId + cryptKey).ToLower();

            if (sign != signParam)
            {
                return(MessageCode.LoginError);
            }
            return(MessageCode.Success);
        }
Exemple #2
0
        public string IsRegistByNameList()
        {
            var    data     = GetParamNOUrlDecode("data");
            string serverid = GetParam("serverId");
            string time     = GetParam("time");
            string sign     = GetParam("sign");

            if (string.IsNullOrEmpty(data) ||
                string.IsNullOrEmpty(serverid) ||
                string.IsNullOrEmpty(time) ||
                string.IsNullOrEmpty(sign))
            {
                return(UAErrorCode.ErrDataOP);
            }
            var key     = CacheFactory.AppsettingCache.GetAppSetting(EnumAppsetting.H5_A8DataKey);
            var appSign = CryptHelper.GetMD5(data + serverid + time + key).ToLower();

            if (sign != appSign)
            {
                return(UAErrorCode.ErrCheckSign);
            }
            data = GetParam("data");
            //UAHelper.WriteLog("IsRegistByNameList", "|" + data + "|" + serverid + "|" + time + "|" + sign + "|");

            var managerList = WebServerHandler.IsRegistByNameList(platFormKey, serverid, data);

            if (managerList == null || managerList.Length <= 0 || string.IsNullOrEmpty(managerList[0].Name))
            {
                return(UAErrorCode.ErrNoUser);
            }
            string str = "";

            foreach (var manager in managerList)
            {
                var rowTime    = manager.RowTime;
                var registTime = ShareUtil.GetTimeTick(rowTime);
                str += "{\"name\":\"" + manager.Name + "\",\"serverId\":\"" + serverid + "\",\"gamelevel\":\"" + manager.Level +
                       "\",\"registtime\":\"" + registTime + "\"},";
            }
            string r = str.Substring(0, str.Length - 1);

            return("{\"code\":\"0\",\"data\":[" + r + "]}");
        }
Exemple #3
0
        private string LoginCheck(string openid, string state, string serverId, string nowTimestamp, string pf,
                                  string sessionId, string sign, string jsNeed, string nickName)
        {
            if (string.IsNullOrEmpty(openid) ||
                string.IsNullOrEmpty(state) ||
                string.IsNullOrEmpty(serverId) ||
                string.IsNullOrEmpty(nowTimestamp) ||
                string.IsNullOrEmpty(pf) ||
                string.IsNullOrEmpty(sessionId) ||
                string.IsNullOrEmpty(sign))
            {
                UAHelper.WriteLog("ret", "参数为空");
                return(UAErrorCode.ErrDataOP);
            }

            if (nowTimestamp.IndexOf(' ') >= 0)
            {
                var times = nowTimestamp.Split(' ');
                if (times.Length > 0)
                {
                    nowTimestamp = times[0];
                }
            }
            var channelAliasEntity = UAFactory.Instance.GetPlatform(platFormKey);

            if (channelAliasEntity == null)
            {
                UAHelper.WriteLog("ret", "登录渠道无效");
                return(UAErrorCode.ErrPlatform);
            }
            string cryptKey     = channelAliasEntity.LoginKey;
            string signParam    = "";
            string signserverId = "default";

            signParam =
                CryptHelper.GetMD5(openid + state + signserverId + nowTimestamp + pf + sessionId + cryptKey).ToLower();
            if (sign != signParam)
            {
                UAHelper.WriteLog("ret", "fail");
                return(UAErrorCode.ErrCheckSign);
            }
            return("0");
        }
Exemple #4
0
        private string LoginCheck(string ousername, string serverid, string time, string isadult, string flag)
        {
            if (string.IsNullOrEmpty(ousername) ||
                string.IsNullOrEmpty(serverid) ||
                string.IsNullOrEmpty(time) ||
                string.IsNullOrEmpty(isadult) ||
                string.IsNullOrEmpty(flag))
            {
                return(UAErrorCode.ErrDataOP);
            }

            var channelAliasEntity = UAFactory.Instance.GetPlatform(platFormKey);

            if (channelAliasEntity == null)
            {
                return(UAErrorCode.ErrPlatform);
            }

            //long time1 = ConvertHelper.ConvertToLong(time, 0);
            //DateTime sourceTime = ShareUtil.GetTime(time1);
            //DateTime nowTime = DateTime.Now;
            ////检查时间是否过期
            //if (sourceTime.AddSeconds(UAFactory.Instance.Timeout30min) < nowTime ||
            //    sourceTime.AddSeconds(-UAFactory.Instance.Timeout30min) > nowTime)
            //{
            //    //记录详细的错误日志
            //    return "{\"ret\":\"fail\",\"msg\":\"响应超时\"}";
            //}

            string cryptKey     = channelAliasEntity.LoginKey;
            string signParam    = "";
            string signserverId = "1";

            signParam = CryptHelper.GetMD5(ousername + signserverId + isadult + time + cryptKey).ToLower();

            if (flag != signParam)
            {
                return(UAErrorCode.ErrCheckSign);
            }
            return("0");
        }
Exemple #5
0
        private MessageCode LoginCheckNew(string openid, string state, string serverId, string nowTimestamp, string pf,
                                          string sessionId, string sign)
        {
            if (string.IsNullOrEmpty(openid) ||
                string.IsNullOrEmpty(state) ||
                string.IsNullOrEmpty(serverId) ||
                string.IsNullOrEmpty(nowTimestamp) ||
                string.IsNullOrEmpty(pf) ||
                string.IsNullOrEmpty(sessionId) ||
                string.IsNullOrEmpty(sign))
            {
                return(MessageCode.LoginNoLogin);
            }

            if (nowTimestamp.IndexOf(' ') >= 0)
            {
                var times = nowTimestamp.Split(' ');
                if (times.Length > 0)
                {
                    nowTimestamp = times[0];
                }
            }
            var channelAliasEntity = UAFactory.Instance.GetPlatform(platFormKey);

            if (channelAliasEntity == null)
            {
                return(MessageCode.LoginNoLogin);
            }
            string cryptKey     = channelAliasEntity.LoginKey;
            string signParam    = "";
            string signserverId = "default";

            signParam =
                CryptHelper.GetMD5(openid + state + signserverId + nowTimestamp + pf + sessionId + cryptKey).ToLower();
            if (sign != signParam)
            {
                return(MessageCode.LoginNoLogin);
            }
            return(MessageCode.Success);
        }
Exemple #6
0
        /// <summary>
        /// a8充值(1)
        /// </summary>
        /// <returns></returns>
        private string Charge()
        {
            try
            {
                /*${payNotifyURL}?sign=96d740ea416b8bf118ead1c49c9a1eda&goodsId=105&price=29&game
                 * OrderId=8a71d1a4-fc36-4487-9577-0b3a3b848b65&payResult=0&playerId=h5_a89e3df51e43f8
                 * 4002b843ecd16fd59617&channelAlias=h5_a8&state=&serverId=default&payTime=1449475293
                 * 422&orderId=1751615
                 * 返回值:{"ret":"success","msg":"ok"}*/

                string sign         = GetParam("sign");
                string orderId      = GetParam("orderId");
                string gameOrderId  = GetParam("gameOrderId");
                string price        = GetParam("price");
                string channelAlias = GetParam("channelAlias");
                string playerId     = GetParam("playerId");
                string serverId     = GetParam("serverId");
                string goodsId      = GetParam("goodsId");
                string payResult    = GetParam("payResult");
                string state        = GetParam("state");
                string payTime      = GetParam("payTime");

                if (string.IsNullOrEmpty(sign) ||
                    string.IsNullOrEmpty(orderId) ||
                    string.IsNullOrEmpty(gameOrderId) ||
                    string.IsNullOrEmpty(price) ||
                    string.IsNullOrEmpty(channelAlias) ||
                    string.IsNullOrEmpty(playerId) ||
                    string.IsNullOrEmpty(serverId) ||
                    string.IsNullOrEmpty(goodsId) ||
                    string.IsNullOrEmpty(payResult) ||
                    string.IsNullOrEmpty(sign) ||
                    string.IsNullOrEmpty(payTime)
                    )
                {
                    return("{\"ret\":\"fail\",\"msg\":\"参数为空\"}");
                }
                if (int.Parse(payResult) == 0)
                {
                    return("{\"ret\":\"fail\",\"msg\":\"没有付款成功\"}");
                }
                //Sign = Md5(orderId + gameOrderId + price + channelAlias + playerId+ serverId + goodsId + payResult + state + payTime + PayKey).toLowerCase();
                long     time1      = ConvertHelper.ConvertToLong(payTime, 0);
                DateTime sourceTime = ShareUtil.GetTime(time1);
                DateTime nowTime    = DateTime.Now;
                //检查时间是否过期
                if (sourceTime.AddSeconds(UAFactory.Instance.Timeout30min) < nowTime ||
                    sourceTime.AddSeconds(-UAFactory.Instance.Timeout30min) > nowTime)
                {
                    //记录详细的错误日志
                    return("{\"ret\":\"fail\",\"msg\":\"响应超时\"}");
                }

                var channelAliasEntity = UAFactory.Instance.GetPlatform(platFormKey);
                if (channelAliasEntity == null)
                {
                    return("{\"ret\":\"fail\",\"msg\":\"channelAlias错误\"}");
                }

                string cryptKey  = channelAliasEntity.ChargeKey;
                string signParam =
                    CryptHelper.GetMD5(orderId + gameOrderId + price + channelAlias + playerId + serverId + goodsId +
                                       payResult + state + payTime + cryptKey).ToLower();
                if (sign != signParam)
                {
                    return("{\"ret\":\"fail\",\"msg\":\"sign错误\"}");
                }

                decimal cash      = ConvertHelper.ConvertToDecimal(price, 0) / 100; //a8价格单位是  分
                Guid    managerId = Guid.Empty;
                try
                {
                    managerId = new Guid(playerId);
                }
                catch
                {
                    return("{\"ret\":\"fail\",\"msg\":\"未找到角色\"}");
                }
                var result = WebServerHandler.BuyPointShipments(platFormKey, "" + serverId, playerId,
                                                                gameOrderId, orderId,
                                                                cash, ConvertHelper.ConvertToInt(goodsId));
                if (result == 0)
                {
                    return("{\"ret\":\"success\",\"msg\":\"ok\"}");
                }
                switch (result)
                {
                case 2062:
                    return("{\"ret\":\"fail\",\"msg\":\"未找到角色\"}");

                case 5211:
                    return("{\"ret\":\"fail\",\"msg\":\"未找到订单\"}");

                case 151:
                    return("{\"ret\":\"fail\",\"msg\":\"物品ID错误\"}");

                default:
                    return("{\"ret\":\"fail\",\"msg\":\"系统内部错误\"}");
                }
            }
            catch (Exception ex)
            {
                SystemlogMgr.Error("a8 dologinnew", ex);
                return("{\"ret\":\"fail\",\"msg\":\"系统内部错误2\"}");
            }
        }
Exemple #7
0
        /// <summary>
        /// a8读取用户数据(7)
        /// </summary>
        /// <returns></returns>
        private String IsRegist()
        {
            string openId   = GetParamNOUrlDecode("openId");
            string serverNo = GetParam("serverNo");
            string pf       = GetParam("pf");
            string time     = GetParam("time");
            string sign     = GetParam("sign");

            if (string.IsNullOrEmpty(openId) ||
                string.IsNullOrEmpty(serverNo) ||
                string.IsNullOrEmpty(pf) ||
                string.IsNullOrEmpty(time) ||
                string.IsNullOrEmpty(sign)
                )
            {
                return(UAErrorCode.ErrDataOP);
            }

            long     time1      = ConvertHelper.ConvertToLong(time, 0);
            DateTime sourceTime = ShareUtil.GetTime((time1));

            DateTime nowTime = DateTime.Now;

            //检查时间是否过期
            if (sourceTime.AddSeconds(UAFactory.Instance.Timeout24Hour) < nowTime ||
                sourceTime.AddSeconds(-UAFactory.Instance.Timeout30min) > nowTime)
            {
                //记录详细的错误日志

                return(UAErrorCode.ErrTimeout);
            }

            var channelAliasEntity = UAFactory.Instance.GetPlatform(platFormKey);

            if (channelAliasEntity == null)
            {
                return(UAErrorCode.ErrPlatform);
            }

            string cryptKey  = channelAliasEntity.LoginKey;
            string signParam =
                CryptHelper.GetMD5(openId + serverNo + pf + time + cryptKey).ToLower();

            if (sign != signParam)
            {
                return(UAErrorCode.ErrCheckSign);
            }

            var entity = WebServerHandler.IsRegist("" + A8csdkEnum.h5_a8, "" + serverNo, openId);

            if (entity == null || string.IsNullOrEmpty(entity.Name))
            {
                return(UAErrorCode.ErrNoUser);
            }
            var oId = UAHelper.StrToUtf8(openId);

            Response.Write("{\"ret\":\"success\",\"msg\":\"ok\",\"roleId\":\"" + entity.Idx + "\",\"roleName\":\"" +
                           oId + "\",\"roleLevel\":\"" + entity.Level + "\"" +
                           ",\"serverNo\":" + serverNo + "\"\",\"serverId\":\" " + serverNo + " \",\"serverName\":\"" +
                           serverNo + " \"}");
            return(UAErrorCode.ErrOK);
        }
Exemple #8
0
        /// <summary>
        /// pay回调
        /// </summary>
        /// <returns></returns>
        private string Charge()
        {
            try
            {
                /*${payNotifyURL}?sign=96d740ea416b8bf118ead1c49c9a1eda&goodsId=105&price=29&game
                 * OrderId=8a71d1a4-fc36-4487-9577-0b3a3b848b65&payResult=0&playerId=h5_a89e3df51e43f8
                 * 4002b843ecd16fd59617&channelAlias=h5_a8&state=&serverId=default&payTime=1449475293
                 * 422&orderId=1751615
                 * 返回值:{"ret":"success","msg":"ok"}*/

                string sign           = GetParam("sign");
                string nonce_str      = GetParam("nonce_str");
                string extra          = GetParam("extra");
                string isTest         = GetParam("isTest");
                string appId          = GetParam("appId");
                string product_id     = GetParam("product_id");
                string order_id       = GetParam("order_id");
                string transaction_id = GetParam("transaction_id");
                string price          = GetParam("cash");
                string uid            = GetParam("uid");
                string game_uid       = GetParam("game_uid");
                string payResult      = GetParam("result");
                //UAHelper.WriteLog("bear Charge",
                //   string.Format(
                //       @"appId={0}&cash={1}&extra={2}&game_uid={3}&isTest={4}&nonce_str={5}&order_id={6}&product_id={7}&result={8}&transaction_id={9}&uid={10}||{11}"
                //       , appId, price, extra, game_uid, isTest, nonce_str, order_id, product_id, payResult, transaction_id, uid,
                //        sign));
                if (string.IsNullOrEmpty(sign) ||
                    string.IsNullOrEmpty(nonce_str) ||
                    string.IsNullOrEmpty(extra) ||
                    string.IsNullOrEmpty(payResult) ||
                    string.IsNullOrEmpty(game_uid) ||
                    string.IsNullOrEmpty(transaction_id) ||
                    string.IsNullOrEmpty(price) ||
                    string.IsNullOrEmpty(sign) ||
                    string.IsNullOrEmpty(uid)
                    )
                {
                    return("{\"ret\":\"fail\",\"msg\":\"参数为空\"}");
                }
                if (payResult.Trim().ToLower() != "success")
                {
                    return("{\"ret\":\"fail\",\"msg\":\"没有付款成功\"}");
                }



                var channelAliasEntity = UAFactory.Instance.GetPlatform(platFormKey);
                if (channelAliasEntity == null)
                {
                    return("{\"ret\":\"fail\",\"msg\":\"channelAlias错误\"}");
                }
                string cryptKey = channelAliasEntity.ChargeKey;


                string signParam =
                    CryptHelper.GetMD5(string.Format(@"appId={0}&cash={1}&extra={2}&game_uid={3}&isTest={4}&nonce_str={5}&order_id={6}&product_id={7}&result={8}&transaction_id={9}&uid={10}{11}"
                                                     , appId, price, extra, game_uid, isTest, nonce_str, order_id, product_id, payResult, transaction_id, uid, cryptKey));
                if (sign != signParam)
                {
                    return("{\"ret\":\"fail\",\"msg\":\"sign错误\"}");
                }
                var ary     = extra.Split('|');
                var server  = "";
                var orderId = "";
                if (ary.Length > 1)
                {
                    orderId = ary[0];
                    server  = ary[1];
                }
                decimal cash = ConvertHelper.ConvertToDecimal(price, 0) / 100; //价格单位是  分

                var zoneName = ShareUtil.ZoneName;
                var list     = NbManagerMgr.GetByAccount(uid, zoneName);
                var manager  = new NbManagerEntity();
                if (list.Count > 0)
                {
                    manager = list[0];
                }
                var result = WebServerHandler.BuyPointShipments(platFormKey, server, "" + manager.Idx,
                                                                orderId, order_id, cash, ConvertHelper.ConvertToInt(product_id));
                if (result == 0)
                {
                    return("OK");
                }
                switch (result)
                {
                case 2062:
                    return("{\"ret\":\"fail\",\"msg\":\"未找到角色\"}");

                case 5211:
                    return("{\"ret\":\"fail\",\"msg\":\"未找到订单\"}");

                case 151:
                    return("{\"ret\":\"fail\",\"msg\":\"物品ID错误\"}");

                default:
                    return("{\"ret\":\"fail\",\"msg\":\"系统内部错误\"}");
                }
            }
            catch (Exception ex)
            {
                SystemlogMgr.Error("bear Charge", ex);
                return("{\"ret\":\"fail\",\"msg\":\"系统内部错误2\"}");
            }
        }
Exemple #9
0
        /// <summary>
        /// egret充值(1)
        /// </summary>
        /// <returns></returns>
        private string Charge()
        {
            try
            {
                string sign        = GetParam("sign");
                string billingId   = GetParam("orderId");
                string price       = GetParam("money");
                string playerId    = GetParam("id");
                string serverId    = GetParam("serverId");
                string goodsId     = GetParam("goodsId");
                string orderId     = GetParam("ext");
                string payTime     = GetParam("time");
                string goodsNumber = GetParam("goodsNumber");


                if (string.IsNullOrEmpty(sign) ||
                    string.IsNullOrEmpty(orderId) ||
                    string.IsNullOrEmpty(price) ||
                    string.IsNullOrEmpty(playerId) ||
                    string.IsNullOrEmpty(serverId) ||
                    string.IsNullOrEmpty(goodsId) ||
                    string.IsNullOrEmpty(sign) ||
                    string.IsNullOrEmpty(payTime) ||
                    string.IsNullOrEmpty(billingId)
                    )
                {
                    return("{\"code\":-1,\"msg\":\"参数为空\"}");
                }
                //var  strs = orderId.Split('|');
                //var zone = "";
                //if (strs.Count() >= 2)
                //    zone = strs[0];

                long     time1      = ConvertHelper.ConvertToLong(payTime, 0);
                DateTime sourceTime = ShareUtil.GetTime(time1 * 1000);
                DateTime nowTime    = DateTime.Now;
                //检查时间是否过期
                if (sourceTime.AddSeconds(UAFactory.Instance.Timeout30min) < nowTime ||
                    sourceTime.AddSeconds(-UAFactory.Instance.Timeout30min) > nowTime)
                {
                    //记录详细的错误日志
                    return("{\"code\":-1,\"msg\":\"响应超时\"}");
                }
                var platFormentity = UAFactory.Instance.GetPlatform(platFormKey);
                if (platFormentity == null)
                {
                    return("{\"code\":-1,\"msg\":\"platFormentity错误\"}");
                }

                string cryptKey = platFormentity.ChargeKey;

                string signParam =
                    CryptHelper.GetMD5(string.Format(@"ext={0}goodsId={1}goodsNumber={2}id={3}money={4}orderId={5}serverId={6}time={7}{8}",
                                                     orderId, goodsId, goodsNumber, playerId, price, billingId, serverId, payTime, cryptKey));
                if (sign != signParam)
                {
                    return("{\"code\":-1,\"msg\":\"sign错误\"}");
                }
                decimal cash = ConvertHelper.ConvertToDecimal(price, 0);  //egret价格单位是  元
                //var zone = "";
                //if (serverId == "1002")
                //    zone = "bls2";
                //else
                //{
                //    zone = "bls1";
                //}
                //var list = NbManagerMgr.GetByAccount(playerId,zone);
                //if(list==null)
                //    return "{\"code\":-1,\"msg\":\"未找到角色\"}";
                //var manager = list[0];

                var result = 0;
                try
                {
                    result = WebServerHandler.BuyPointShipments(platFormKey, "" + serverId, "" + playerId,
                                                                orderId, billingId, cash, ConvertHelper.ConvertToInt(goodsId));//白鹭传account
                }
                catch (Exception)
                {
                }

                if (result == 0)
                {
                    return("{\"code\":0,\"msg\":\"ok\"}");
                }
                switch (result)
                {
                case 2062:
                    return("{\"code\":-1,\"msg\":\"未找到角色\"}");

                case 5211:
                    return("{\"code\":-1,\"msg\":\"未找到订单\"}");

                case 151:
                    return("{\"code\":-1,\"msg\":\"物品ID错误\"}");

                default:
                    return("{\"code\":-1,\"msg\":\"系统内部错误\"" + result + "}");
                }
            }
            catch (Exception ex)
            {
                SystemlogMgr.Error("h5_egret Charge", ex);
                return("{\"code\":-1,\"msg\":\"系统内部错误2\"}");
            }
        }
Exemple #10
0
        private string Charge()
        {
            try
            {
                string serverid = GetParam("serverid");
                string orderno  = GetParam("orderno");
                string username = GetParam("username");
                string addgold  = GetParam("addgold");
                string rmb      = GetParam("rmb");
                string paytime  = GetParam("paytime");
                string ext      = GetParam("ext");
                string sign     = GetParam("sign");

                if (string.IsNullOrEmpty(sign) ||
                    string.IsNullOrEmpty(serverid) ||
                    string.IsNullOrEmpty(orderno) ||
                    string.IsNullOrEmpty(username) ||
                    string.IsNullOrEmpty(addgold) ||
                    string.IsNullOrEmpty(rmb) ||
                    string.IsNullOrEmpty(paytime) ||
                    string.IsNullOrEmpty(ext) ||
                    string.IsNullOrEmpty(sign))
                {
                    return("-4");
                }

                //Sign = Md5(orderno+username + serverid+addgold + rmb+paytime+ext+key).toLowerCase();
                //long time1 = ConvertHelper.ConvertToLong(paytime, 0);
                //DateTime sourceTime = ShareUtil.GetTime(time1);
                //DateTime nowTime = DateTime.Now;
                ////检查时间是否过期
                //if (sourceTime.AddSeconds(UAFactory.Instance.Timeout30min) < nowTime ||
                //    sourceTime.AddSeconds(-UAFactory.Instance.Timeout30min) > nowTime)
                //{
                //    //记录详细的错误日志
                //    return "{\"ret\":\"fail\",\"msg\":\"响应超时\"}";
                //}

                var channelAliasEntity = UAFactory.Instance.GetPlatform(platFormKey);
                if (channelAliasEntity == null)
                {
                    return("-4");
                }

                string cryptKey  = channelAliasEntity.ChargeKey;
                string signParam =
                    CryptHelper.GetMD5(orderno + username + serverid + addgold + rmb + paytime + ext + cryptKey).ToLower();
                if (sign != signParam)
                {
                    return("-4");
                }

                decimal cash = ConvertHelper.ConvertToDecimal(rmb, 0);
                var     exts = ext.Split('_');
                if (exts.Length < 3)
                {
                    return("-4");
                }
                int    mallCode = ConvertHelper.ConvertToInt(exts[0]);
                string sId      = exts[1];
                string orderId  = exts[2];
                var    result   = WebServerHandler.BuyPointShipments(platFormKey, sId, username,
                                                                     orderId, orderno,
                                                                     cash, mallCode);
                if (result == 0)
                {
                    return("1");
                }
                SystemlogMgr.Error("充值", "code:" + result);
                switch (result)
                {
                case 2062:
                    return("-2");

                case 5211:
                    return("-1");

                case 151:
                    return("-1");

                default:
                    return("-7");
                }
            }
            catch (Exception ex)
            {
                SystemlogMgr.Error("a8 dologinnew", ex);
                return("-7");
            }
        }