Example #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     base.Response.Write("success");
     SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
     AlarmNotify alarmNotify = new NotifyClient(masterSettings.WeixinAppId, masterSettings.WeixinAppSecret, masterSettings.WeixinPartnerID, masterSettings.WeixinPartnerKey, masterSettings.WeixinPaySignKey).GetAlarmNotify(base.Request.InputStream);
     if (alarmNotify != null)
     {
         AlarmInfo info = new AlarmInfo {
             AlarmContent = alarmNotify.AlarmContent,
             AppId = alarmNotify.AppId,
             Description = alarmNotify.Description
         };
         VShopHelper.SaveAlarm(info);
     }
 }
Example #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
     PayNotify payNotify = new NotifyClient(masterSettings.WeixinAppId, masterSettings.WeixinAppSecret, masterSettings.WeixinPartnerID, masterSettings.WeixinPartnerKey, masterSettings.WeixinPaySignKey).GetPayNotify(base.Request.InputStream);
     if (payNotify != null)
     {
         this.OrderId = payNotify.PayInfo.OutTradeNo;
         this.Order = ShoppingProcessor.GetOrderInfo(this.OrderId);
         if (this.Order == null)
         {
             base.Response.Write("success");
         }
         else
         {
             this.Order.GatewayOrderId = payNotify.PayInfo.TransactionId;
             this.UserPayOrder();
         }
     }
 }
Example #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     base.Response.Write("success");
     SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
     FeedBackNotify feedBackNotify = new NotifyClient(masterSettings.WeixinAppId, masterSettings.WeixinAppSecret, masterSettings.WeixinPartnerID, masterSettings.WeixinPartnerKey, masterSettings.WeixinPaySignKey).GetFeedBackNotify(base.Request.InputStream);
     if (feedBackNotify != null)
     {
         string msgType = feedBackNotify.MsgType;
         if (msgType != null)
         {
             if (!(msgType == "request"))
             {
                 if (msgType == "confirm")
                 {
                     feedBackNotify.MsgType = "已完成";
                 }
             }
             else
             {
                 feedBackNotify.MsgType = "未处理";
             }
         }
         if (VShopHelper.GetFeedBack(feedBackNotify.FeedBackId) != null)
         {
             VShopHelper.UpdateFeedBackMsgType(feedBackNotify.FeedBackId, feedBackNotify.MsgType);
         }
         else
         {
             FeedBackInfo info = new FeedBackInfo {
                 AppId = feedBackNotify.AppId,
                 ExtInfo = feedBackNotify.ExtInfo,
                 FeedBackId = feedBackNotify.FeedBackId,
                 MsgType = feedBackNotify.MsgType,
                 OpenId = feedBackNotify.OpenId,
                 Reason = feedBackNotify.Reason,
                 Solution = feedBackNotify.Solution,
                 TransId = feedBackNotify.TransId
             };
             VShopHelper.SaveFeedBack(info);
         }
     }
 }
Example #4
0
 private void dlstPtReviews_DeleteCommand(object source, DataListCommandEventArgs e)
 {
     int id = Convert.ToInt32(e.CommandArgument, CultureInfo.InvariantCulture);
     if (e.CommandName == "Delete")
     {
         if (VShopHelper.DeleteFeedBack(id))
         {
             this.ShowMsg("删除成功", true);
             this.BindPtReview();
         }
         else
         {
             this.ShowMsg("删除失败", false);
         }
     }
     else
     {
         FeedBackInfo feedBack = VShopHelper.GetFeedBack(id);
         if (feedBack != null)
         {
             SiteSettings masterSettings = SettingsManager.GetMasterSettings(false);
             PayAccount account = new PayAccount(masterSettings.WeixinAppId, masterSettings.WeixinAppSecret, masterSettings.WeixinPartnerID, masterSettings.WeixinPartnerKey, masterSettings.WeixinPaySignKey);
             NotifyClient client = new NotifyClient(account);
             if (client.UpdateFeedback(feedBack.FeedBackId, feedBack.OpenId))
             {
                 VShopHelper.UpdateFeedBackMsgType(feedBack.FeedBackId, "已处理");
                 this.ShowMsg("处理成功", true);
                 this.BindPtReview();
             }
             else
             {
                 this.ShowMsg("处理失败", false);
             }
         }
     }
 }