Zbiór zmian 960 dla trunk/eCard/eCardMVC/Platnosci/Models/eCardData.cs
- Data:
- 2009-12-22 10:43:43 (16 years ago)
- Pliki:
-
- 1 zmodyfikowane
-
trunk/eCard/eCardMVC/Platnosci/Models/eCardData.cs (zmodyfikowane) (7 diffs)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/eCard/eCardMVC/Platnosci/Models/eCardData.cs
r959 r960 1 1 using System; 2 using System.Web;3 2 using System.Net; 4 3 using System.IO; 5 4 using System.Linq; 6 using System.Web.Mvc;7 5 using System.Configuration; 8 6 using Platnosci.Core.Linq; … … 16 14 private readonly FunkcjePlatnosci _funkcjePlatnosci; 17 15 private IRepository<PlatnosciEcard> _repPayment; 18 16 19 17 public eCardData(IRepository<PlatnosciEcard> repPayment) 20 18 { … … 25 23 public String GetUrl(Merchant merchant) 26 24 { 27 if (merchant == null) 28 throw new ArgumentNullException(" parametr merchant is null in GetUrl method");29 25 if (merchant == null) 26 throw new ArgumentNullException("merchant"); 27 30 28 var dane = ConfigurationManager.AppSettings["eCard.Url"] + "?ORDERDESCRIPTION=" + merchant.Payment.ORDERDESCRIPTION; 31 29 dane += "&AMOUNT=" + merchant.Payment.AMOUNT + "&CURRENCY=" + merchant.Payment.CURRENCY; … … 42 40 { 43 41 var merchant = new Merchant(); 44 42 45 43 var waluta = _funkcjePlatnosci.SetAmount(invoice); 46 44 var newPayment = _funkcjePlatnosci.CreateAndAddNewPyment(invoice, waluta, payer, sessionId); 47 45 48 46 merchant.SystemKsiegowy = invoice.SystemKsiegowyId.ToString(); 49 if (ConfigurationManager.AppSettings["wersja"] == "TEST") 50 merchant.SystemKsiegowy = "2"; 47 48 #if DEBUG 49 //TODO: find better method to set SystemKsiegowy when testing or developing 50 merchant.SystemKsiegowy = "2"; 51 #endif 51 52 52 53 merchant.Payment = newPayment; … … 59 60 var linkFail = ConfigurationManager.AppSettings["Strona"]; 60 61 linkFail += "/" + lang + ConfigurationManager.AppSettings["LinkFail"]; 61 linkFail += "/" + newPayment.IDFaktury + "?o=" + orderek; 62 linkFail += "/" + newPayment.IDFaktury + "?o=" + orderek; 62 63 63 64 var linkOk = ConfigurationManager.AppSettings["Strona"]; … … 68 69 merchant.LinkFail = linkFail; 69 70 70 if (merchant != null)merchant.IsValid();71 merchant.IsValid(); 71 72 72 73 return merchant; … … 88 89 { 89 90 if (merchant == null) 90 throw new ArgumentNullException(" parametr merchant is null in SetHash method");91 throw new ArgumentNullException("merchant"); 91 92 92 93 var platnosc = _repPayment.Find(i => i.ORDERDESCRIPTION == merchant.Payment.ORDERDESCRIPTION && i.IDFaktury == merchant.Payment.IDFaktury && i.Data == merchant.Payment.Data).SingleOrDefault(); 93 94 94 if (platnosc == null) 95 if (platnosc == null) 95 96 merchant.Hash = HASH_ERROR_INFO; 96 97 else
