Beispiel #1
0
 public void Testt3()
 {
     var r = ShareUtil.GetMD5("appId=16&data=[{\"id\":70101,\"name\":\"50钻石\",\"price\":500,\"desc\":\"50钻石\"},{\"id\":70102,\"name\":\"200钻石\",\"price\":2000,\"desc\":\"200钻石\"},{\"id\":70103,\"name\":\"1000钻石\",\"price\":10000,\"desc\":\"1000钻石\"}," +
                              "{\"id\":70104,\"name\":\"2000钻石\",\"price\":20000,\"desc\":\"2000钻石\"},{\"id\":70105,\"name\":\"5000钻石\",\"price\":50000,\"desc\":\"5000钻石\"},{\"id\":70001,\"name\":\"月卡\",\"price\":3000,\"desc\":\"月卡\"},{\"id\":70009,\"name\":\"新手礼包\",\"price\":100,\"desc\":\"新手礼包\"}," +
                              "{\"id\":70010,\"name\":\"超值礼包\",\"price\":1800,\"desc\":\"超值礼包\"},{\"id\":70011,\"name\":\"周末优惠礼包\",\"price\":5800,\"desc\":\"周末优惠礼包\"},{\"id\":70012,\"name\":\"强化礼包\",\"price\":6000,\"desc\":\"强化礼包\"},{\"id\":70013,\"name\":\"建队礼包\",\"price\":28800,\"desc\":\"建队礼包\"},{\"id\":70014,\"name\":\"限时礼包\",\"price\":19800,\"desc\":\"限时礼包\"}]e4cd0bd43bc73a811e99e30f077b29be");
     var rr  = r;
     var rrr = rr;
 }
Beispiel #2
0
        public void Testw1()
        {
            //sign + "|" + billingId + "|" + price + "|" + playerId + "|" + serverId + "|" + goodsId + "|" + orderId + "|" + payTime + "|" + goodsNumber
            var sign        = "f5adb9b5eb1fd40854ea694724186e4c";
            var billingId   = "42336448584246664645744563464E4D48513D3D";
            var playerId    = "c9cccd5811332272216ee6e6cdf2bd91";
            var price       = "1";
            var payTime     = "1468405081";
            var serverId    = "1";
            var goodsId     = "70101";
            var goodsNumber = "1";
            var orderId     = "80302016071318141411292487";
            var cryptKey    = "3pN9Z25DPp1smngw6g84b";

            orderId = "42336448584246664645744664464A4D48773D3D";
            var id    = "c9cccd5811332272216ee6e6cdf2bd91";
            var money = 1;
            var time  = 1468463343;

            serverId    = "1";
            goodsId     = "70101";
            goodsNumber = "1";
            var ext = "80302016071414580708529147";

            sign = "6377fa0b69a0ef2da66bc1351a4f2d38";
            var    r         = "";
            string signParam =
                ShareUtil.GetMD5("ext=80302016071318141411292487goodsId=70101goodsNumber=1id=c9cccd5811332272216ee6e6cdf2bd91money=1orderId=42336448584246664645744563464E4D48513D3DserverId=1time=14684633433pN9Z25DPp1smngw6g84b");

            if (sign == signParam)
            {
                r = "09";
            }
            long     time1      = ConvertHelper.ConvertToLong(payTime, 0);
            DateTime sourceTime = ShareUtil.GetTime(time1 * 1000);
            DateTime nowTime    = DateTime.Now;
            //检查时间是否过期
            long _timeout30min = 1800000;

            if (sourceTime.AddSeconds(_timeout30min) < nowTime ||
                sourceTime.AddSeconds(-_timeout30min) > nowTime)
            {
                //记录详细的错误日志
                r = "{\"code\":-1,\"msg\":\"响应超时\"}";
            }
            r = "" + MallCore.Instance.BuyPointShipments(playerId, ext, orderId, money, 70101).Code;
            var rr  = r;
            var rrr = rr;
        }