Exemplo n.º 1
0
 private void DoValidate()
 {
     System.Collections.Specialized.NameValueCollection parameters = new System.Collections.Specialized.NameValueCollection
     {
         this.Page.Request.Form,
         this.Page.Request.QueryString
     };
     this.Gateway = this.Page.Request.QueryString["HIGW"];
     this.Notify  = PaymentNotify.CreateInstance(this.Gateway, parameters);
     if (this.isBackRequest)
     {
         this.Notify.ReturnUrl = Globals.FullPath(Globals.GetSiteUrls().UrlData.FormatUrl("InpourReturn_url", new object[]
         {
             this.Gateway
         })) + "?" + this.Page.Request.Url.Query;
     }
     this.InpourId      = this.Notify.GetOrderId();
     this.Amount        = this.Notify.GetOrderAmount();
     this.InpourRequest = PersonalHelper.GetInpourBlance(this.InpourId);
     if (this.InpourRequest == null)
     {
         this.ResponseStatus(true, "success");
     }
     else
     {
         this.Amount  = this.InpourRequest.InpourBlance;
         this.paymode = TradeHelper.GetPaymentMode(this.InpourRequest.PaymentId);
         if (this.paymode == null)
         {
             this.ResponseStatus(true, "gatewaynotfound");
         }
         else
         {
             this.Notify.Finished          += new System.EventHandler <FinishedEventArgs>(this.Notify_Finished);
             this.Notify.NotifyVerifyFaild += new System.EventHandler(this.Notify_NotifyVerifyFaild);
             this.Notify.Payment           += new System.EventHandler(this.Notify_Payment);
             this.Notify.VerifyNotify(30000, HiCryptographer.Decrypt(this.paymode.Settings));
         }
     }
 }