Index: /trunk/eCard/eCardMVC/adMoto.Payments.Web/Controllers/eCardController.cs
===================================================================
--- /trunk/eCard/eCardMVC/adMoto.Payments.Web/Controllers/eCardController.cs (revision 985)
+++ /trunk/eCard/eCardMVC/adMoto.Payments.Web/Controllers/eCardController.cs (revision 989)
@@ -6,8 +6,4 @@
 using adMoto.Payments.Web.Exceptions;
 using Elmah;
-using System.Collections.Generic;
-
-using System.Configuration;
-using System.Linq;
 
 namespace adMoto.Payments.Web.Controllers
@@ -37,75 +33,21 @@
                 if (System.Web.HttpContext.Current != null)
                     ErrorSignal.FromCurrentContext().Raise(new ConfirmationLogger(), System.Web.HttpContext.Current);
-                
+
                 var potwierdzenie = new PotwierdzeniaEcard();
-                
                 potwierdzenie.MERCHANTNUMBER = Request["MERCHANTNUMBER"] ?? Request.Form["MERCHANTNUMBER"];
-                if (String.IsNullOrEmpty(potwierdzenie.MERCHANTNUMBER))
-                    throw new ArgumentNullException("MERCHANTNUMBER");
-
-                string ordernumber = Request["ORDERNUMBER"] ?? Request.Form["ORDERNUMBER"];
-                if (!String.IsNullOrEmpty(ordernumber))
-                    potwierdzenie.ORDERNUMBER = Convert.ToInt32(ordernumber);
-                else
-                    throw new ArgumentNullException("ORDERNUMBER");
-
+                potwierdzenie.ORDERNUMBER = Request["ORDERNUMBER"] != null ? Convert.ToInt32(Request["ORDERNUMBER"]) : Convert.ToInt32(Request.Form["ORDERNUMBER"]);
                 potwierdzenie.COMMTYPE = Request["COMMTYPE"] ?? Request.Form["COMMTYPE"];
-                if (String.IsNullOrEmpty(potwierdzenie.COMMTYPE))
-                    throw new ArgumentNullException("COMMTYPE");
-
                 potwierdzenie.CURRENTSTATE = Request["CURRENTSTATE"] ?? Request.Form["CURRENTSTATE"];
-                if (String.IsNullOrEmpty(potwierdzenie.CURRENTSTATE))
-                    throw new ArgumentNullException("CURRENTSTATE");
-
                 potwierdzenie.PREVIOUSSTATE = Request["PREVIOUSSTATE"] ?? Request.Form["PREVIOUSSTATE"];
-                if (String.IsNullOrEmpty(potwierdzenie.PREVIOUSSTATE))
-                    throw new ArgumentNullException("PREVIOUSSTATE");
-
-                string paymenttype = Request["PAYMENTTYPE"] ?? Request.Form["PAYMENTTYPE"];
-                if (!String.IsNullOrEmpty(paymenttype))
-                    potwierdzenie.PAYMENTTYPE = Convert.ToBoolean(paymenttype);
-                else
-                    throw new ArgumentNullException("PAYMENTTYPE");
-
-                string eventtype = Request["EVENTTYPE"] ?? Request.Form["EVENTTYPE"];
-                if (!String.IsNullOrEmpty(eventtype))
-                    potwierdzenie.EVENTTYPE = Convert.ToBoolean(eventtype);
-                else
-                    throw new ArgumentNullException("EVENTTYPE");
-
-                string paymentnumber = Request["PAYMENTNUMBER"] ?? Request.Form["PAYMENTNUMBER"];
-                if (!String.IsNullOrEmpty(paymentnumber))
-                    potwierdzenie.PAYMENTNUMBER = Convert.ToBoolean(paymentnumber);
-                else
-                    throw new ArgumentNullException("PAYMENTNUMBER");
-               
+                potwierdzenie.PAYMENTTYPE = Request["PAYMENTTYPE"] != null ? Convert.ToBoolean(Convert.ToInt32(Request["PAYMENTTYPE"])) : Convert.ToBoolean(Convert.ToInt32(Request.Form["PAYMENTTYPE"]));
+                potwierdzenie.EVENTTYPE = Request["EVENTTYPE"] != null ? Convert.ToBoolean(Convert.ToInt32(Request["EVENTTYPE"])) : Convert.ToBoolean(Convert.ToInt32(Request.Form["EVENTTYPE"]));
+                potwierdzenie.PAYMENTNUMBER = Request["PAYMENTNUMBER"] != null ? Convert.ToBoolean(Convert.ToInt32(Request["PAYMENTNUMBER"])) : Convert.ToBoolean(Convert.ToInt32(Request.Form["PAYMENTNUMBER"]));
+                potwierdzenie.APPROVALCODE = Request["APPROVALCODE"] ?? Request.Form["APPROVALCODE"];
                 potwierdzenie.VALIDATIONCODE = Request["VALIDATIONCODE"] ?? Request.Form["VALIDATIONCODE"];
-                if (String.IsNullOrEmpty(potwierdzenie.VALIDATIONCODE))
-                    throw new ArgumentNullException("VALIDATIONCODE");
-
-                //zapisywany do bazy tylko wtedy, gdy validationcode = 000
-                potwierdzenie.APPROVALCODE = Request["APPROVALCODE"] ?? Request.Form["APPROVALCODE"];
-                if (String.IsNullOrEmpty(potwierdzenie.APPROVALCODE) && potwierdzenie.VALIDATIONCODE == "000")
-                    throw new ArgumentNullException("APPROVALCODE");
-
                 potwierdzenie.BIN = Request["BIN"] ?? Request.Form["BIN"];
-                if (String.IsNullOrEmpty(potwierdzenie.BIN))
-                    throw new ArgumentNullException("BIN");
-                    
-                string authtime = Request["AUTHTIME"] ?? Request.Form["AUTHTIME"];
-                if (!String.IsNullOrEmpty(authtime))
-                    potwierdzenie.AUTHTIME = Convert.ToDateTime(authtime);
-                else
-                    throw new ArgumentNullException("AUTHTIME");
-               
+                potwierdzenie.AUTHTIME = Request["AUTHTIME"] != null ? Convert.ToDateTime(Request["AUTHTIME"]) : Convert.ToDateTime(Request.Form["AUTHTIME"]);
                 potwierdzenie.TYPE = Request["TYPE"] ?? Request.Form["TYPE"];
-                if (String.IsNullOrEmpty(potwierdzenie.TYPE))
-                    throw new ArgumentNullException("TYPE");
-
                 potwierdzenie.WITHCVC = Request["WITHCVC"] ?? Request.Form["WITHCVC"];
-                if (String.IsNullOrEmpty(potwierdzenie.WITHCVC))
-                    throw new ArgumentNullException("WITHCVC");      
-               
-                potwierdzenie.DATATRANSMISJI = DateTime.Now; 
+                potwierdzenie.DATATRANSMISJI = DateTime.Now;
 
                 _eCardRepository.Insert(potwierdzenie);
@@ -121,5 +63,5 @@
 
             return content;
-        }       
+        }
     }
 }
