Index: trunk/eCard/eCardMVC/Platnosci/Models/eCardData.cs
===================================================================
--- trunk/eCard/eCardMVC/Platnosci/Models/eCardData.cs (revision 959)
+++ trunk/eCard/eCardMVC/Platnosci/Models/eCardData.cs (revision 960)
@@ -1,8 +1,6 @@
 ﻿using System;
-using System.Web;
 using System.Net;
 using System.IO;
 using System.Linq;
-using System.Web.Mvc;
 using System.Configuration;
 using Platnosci.Core.Linq;
@@ -16,5 +14,5 @@
         private readonly FunkcjePlatnosci _funkcjePlatnosci;
         private IRepository<PlatnosciEcard> _repPayment;
-        
+
         public eCardData(IRepository<PlatnosciEcard> repPayment)
         {
@@ -25,7 +23,7 @@
         public String GetUrl(Merchant merchant)
         {
-            if (merchant == null) 
-                throw new ArgumentNullException("parametr merchant is null in GetUrl method");
-            
+            if (merchant == null)
+                throw new ArgumentNullException("merchant");
+
             var dane = ConfigurationManager.AppSettings["eCard.Url"] + "?ORDERDESCRIPTION=" + merchant.Payment.ORDERDESCRIPTION;
             dane += "&AMOUNT=" + merchant.Payment.AMOUNT + "&CURRENCY=" + merchant.Payment.CURRENCY;
@@ -42,11 +40,14 @@
         {
             var merchant = new Merchant();
-           
+
             var waluta = _funkcjePlatnosci.SetAmount(invoice);
             var newPayment = _funkcjePlatnosci.CreateAndAddNewPyment(invoice, waluta, payer, sessionId);
 
             merchant.SystemKsiegowy = invoice.SystemKsiegowyId.ToString();
-            if (ConfigurationManager.AppSettings["wersja"] == "TEST")
-                merchant.SystemKsiegowy = "2";
+
+#if DEBUG
+            //TODO: find better method to set SystemKsiegowy when testing or developing
+            merchant.SystemKsiegowy = "2";
+#endif
 
             merchant.Payment = newPayment;
@@ -59,5 +60,5 @@
             var linkFail = ConfigurationManager.AppSettings["Strona"];
             linkFail += "/" + lang + ConfigurationManager.AppSettings["LinkFail"];
-            linkFail += "/" + newPayment.IDFaktury + "?o=" + orderek; 
+            linkFail += "/" + newPayment.IDFaktury + "?o=" + orderek;
 
             var linkOk = ConfigurationManager.AppSettings["Strona"];
@@ -68,5 +69,5 @@
             merchant.LinkFail = linkFail;
 
-            if (merchant != null) merchant.IsValid();
+            merchant.IsValid();
 
             return merchant;
@@ -88,9 +89,9 @@
         {
             if (merchant == null)
-                throw new ArgumentNullException("parametr merchant is null in SetHash method");
+                throw new ArgumentNullException("merchant");
 
             var platnosc = _repPayment.Find(i => i.ORDERDESCRIPTION == merchant.Payment.ORDERDESCRIPTION && i.IDFaktury == merchant.Payment.IDFaktury && i.Data == merchant.Payment.Data).SingleOrDefault();
 
-            if (platnosc == null)            
+            if (platnosc == null)
                 merchant.Hash = HASH_ERROR_INFO;
             else
