Пример #1
0
        protected Dictionary <string, string> createOnbehalfParam(Zalo3rdAppInfo appInfo, JObject data)
        {
            long timestamp = (long)(DateTime.UtcNow - Jan1st1970).TotalMilliseconds;

            StringBuilder macContent = new StringBuilder();

            macContent.Append(appInfo.appId);

            Dictionary <string, string> param = new Dictionary <string, string>();

            foreach (var item in data)
            {
                macContent.Append(item.Value);
                param.Add(item.Key, item.Value.ToString());
            }
            macContent.Append(timestamp);
            macContent.Append(appInfo.secretKey);
            string mac = MacUtils.buildMac(macContent.ToString());

            param.Add("appid", appInfo.appId.ToString());
            param.Add("timestamp", timestamp.ToString());
            param.Add("mac", mac);

            return(param);
        }
Пример #2
0
 public Zalo3rdAppClient(Zalo3rdAppInfo _appInfo)
 {
     this._appInfo = _appInfo;
 }