void DoValidate()
 {
     NameValueCollection values2 = new NameValueCollection();
     values2.Add(Page.Request.Form);
     values2.Add(Page.Request.QueryString);
     NameValueCollection parameters = values2;
     Gateway = Page.Request.QueryString["HIGW"];
     Notify = PaymentNotify.CreateInstance(Gateway, parameters);
     if (isBackRequest)
     {
         Notify.ReturnUrl = Globals.FullPath(Globals.GetSiteUrls().UrlData.FormatUrl("DistributorInpourReturn_url", new object[] { Gateway }));
         Notify.ReturnUrl = Notify.ReturnUrl + "?" + Page.Request.Url.Query;
     }
     InpourId = Notify.GetOrderId();
     Amount = Notify.GetOrderAmount();
     InpourRequest = SubsiteStoreHelper.GetInpouRequest(InpourId);
     if (InpourRequest == null)
     {
         ResponseStatus(true, "success");
     }
     else
     {
         Amount = InpourRequest.InpourBlance;
         paymode = SubsiteStoreHelper.GetPaymentMode(InpourRequest.PaymentId);
         if (paymode == null)
         {
             ResponseStatus(true, "gatewaynotfound");
         }
         else
         {
             Notify.Finished += new EventHandler<FinishedEventArgs>(Notify_Finished);
             Notify.NotifyVerifyFaild += new EventHandler(Notify_NotifyVerifyFaild);
             Notify.Payment += new EventHandler(Notify_Payment);
             Notify.VerifyNotify(0x7530, Cryptographer.Decrypt(paymode.Settings));
         }
     }
 }
Ejemplo n.º 2
0
 void DoValidate()
 {
     NameValueCollection values2 = new NameValueCollection();
     values2.Add(this.Page.Request.Form);
     values2.Add(this.Page.Request.QueryString);
     NameValueCollection parameters = values2;
     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("PaymentReturn_url", new object[] { this.Gateway })) + "?" + this.Page.Request.Url.Query;
     }
     this.Amount = this.Notify.GetOrderAmount();
     this.OrderId = this.Notify.GetOrderId();
     this.Order = TradeHelper.GetOrderInfo(this.OrderId);
     if (this.Order == null)
     {
         this.ResponseStatus(true, "ordernotfound");
     }
     else
     {
         this.Order.GatewayOrderId = this.Notify.GetGatewayOrderId();
         PaymentModeInfo paymentMode = TradeHelper.GetPaymentMode(this.Order.PaymentTypeId);
         if (paymentMode == null)
         {
             this.ResponseStatus(true, "gatewaynotfound");
         }
         else
         {
             this.Notify.Finished += new EventHandler<FinishedEventArgs>(this.Notify_Finished);
             this.Notify.NotifyVerifyFaild += new EventHandler(this.Notify_NotifyVerifyFaild);
             this.Notify.Payment += new EventHandler(this.Notify_Payment);
             this.Notify.VerifyNotify(0x7530, Cryptographer.Decrypt(paymentMode.Settings));
         }
     }
 }