Esempio n. 1
0
        protected void Page_Load(object sender, System.EventArgs e)
        {
            base.Response.Write("success");
            SiteSettings masterSettings = SettingsManager.GetMasterSettings(true);
            NotifyClient notifyClient;

            if (masterSettings.EnableSP)
            {
                notifyClient = new NotifyClient(masterSettings.Main_AppId, masterSettings.WeixinAppSecret, masterSettings.Main_Mch_ID, masterSettings.Main_PayKey, true, masterSettings.WeixinAppId, masterSettings.WeixinPartnerID);
            }
            else
            {
                notifyClient = new NotifyClient(masterSettings.WeixinAppId, masterSettings.WeixinAppSecret, masterSettings.WeixinPartnerID, masterSettings.WeixinPartnerKey, false, "", "");
            }
            AlarmNotify alarmNotify = notifyClient.GetAlarmNotify(base.Request.InputStream);

            if (alarmNotify == null)
            {
                return;
            }
            VShopHelper.SaveAlarm(new AlarmInfo
            {
                AlarmContent = alarmNotify.AlarmContent,
                AppId        = alarmNotify.AppId,
                Description  = alarmNotify.Description
            });
        }
 public AlarmNotify GetAlarmNotify(string xml)
 {
     if (!string.IsNullOrEmpty(xml))
     {
         AlarmNotify notifyObject = Utils.GetNotifyObject <AlarmNotify>(xml);
         if ((notifyObject != null) && this.ValidAlarmSign(notifyObject))
         {
             return(notifyObject);
         }
     }
     return(null);
 }
Esempio n. 3
0
        public AlarmNotify GetAlarmNotify(string xml)
        {
            AlarmNotify result;

            if (string.IsNullOrEmpty(xml))
            {
                result = null;
            }
            else
            {
                AlarmNotify notifyObject = Utils.GetNotifyObject <AlarmNotify>(xml);
                if (notifyObject == null || !this.ValidAlarmSign(notifyObject))
                {
                    result = null;
                }
                else
                {
                    result = notifyObject;
                }
            }
            return(result);
        }
Esempio n. 4
0
 private bool ValidAlarmSign(AlarmNotify notify)
 {
     return(true);
 }