Beispiel #1
0
        public static WechatWebConfig GetWxConfig(string url)
        {
            var config = new WechatWebConfig {
                appid     = ConfigurationManager.AppSettings["appid"],
                oauthid   = ConfigurationManager.AppSettings["oauthId"],
                nonce     = GetNonce(),
                ticket    = JSAPITicket.GetTicket(),
                timestamp = GetTimestamp(),
                url       = url
            };

            config.signature = GetSignature(config.ticket, config.timestamp, config.nonce, url);
            return(config);
        }
Beispiel #2
0
 public static string GetJSApiTicket()
 {
     return(JSAPITicket.GetTicket());
 }