Zbiór zmian 967 dla trunk/eCard/eCardMVC
- Data:
- 2009-12-22 15:05:08 (16 years ago)
- Lokalizacja:
- trunk/eCard/eCardMVC/Platnosci
- Pliki:
-
- 5 zmodyfikowane
-
Controllers/PlatnoscController.cs (zmodyfikowane) (6 diffs)
-
Global.asax.cs (zmodyfikowane) (1 diff)
-
Models/eCardData.cs (zmodyfikowane) (3 diffs)
-
Platnosci.Web.csproj.user (zmodyfikowane) (1 diff)
-
Web.config (zmodyfikowane) (2 diffs)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs
r966 r967 9 9 { 10 10 11 [Authorize]11 //[Authorize] 12 12 public class PlatnoscController : Controller 13 13 { … … 36 36 37 37 } 38 39 [Authorize] 38 40 public ActionResult Show(string id, string language) 39 41 { 40 language =_funkcjePlatnosci.SetLanguage(language);42 _funkcjePlatnosci.SetLanguage(language); 41 43 var id1 = ConvertId(id); 42 44 … … 63 65 public ActionResult Show(Payer payer, string language) 64 66 { 65 language =_funkcjePlatnosci.SetLanguage(language);67 _funkcjePlatnosci.SetLanguage(language); 66 68 67 69 if (String.IsNullOrEmpty(payer.FirstName)) … … 88 90 } 89 91 90 public ActionResult Ok(string id, string language, string o)91 { 92 var order = ConvertId(o);93 language =_funkcjePlatnosci.SetLanguage(language);92 public ActionResult Ok(string id, string order, string language) 93 { 94 var orderId = ConvertId(order); 95 _funkcjePlatnosci.SetLanguage(language); 94 96 var id1 = ConvertId(id); 95 97 var platnosc = _repVPayment.Find(p => p.ID_faktury == id1).SingleOrDefault(); … … 103 105 //jesli tak, to sprawdzamy czy przyszlo potwierdzenie z eCardu. 104 106 105 if (CheckConfirm(id1, order ) == 0) //nie ma potwierdzenia z eCardu107 if (CheckConfirm(id1, orderId) == 0) //nie ma potwierdzenia z eCardu 106 108 invoiceDeatailsViewData.info = String.Format(_translateManager.Translate("tlumaczenia", "blad1"), invoiceDeatailsViewData.vPlatnosciEcard.Faktura_Numer); 107 109 108 else if (CheckConfirm(id1, order ) == 2)110 else if (CheckConfirm(id1, orderId) == 2) 109 111 invoiceDeatailsViewData.info = _translateManager.Translate("tlumaczenia", "weryfikacja"); 110 112 111 113 return View(invoiceDeatailsViewData); 112 114 } 113 public ActionResult Fail(string id, string language) 114 { 115 language = _funkcjePlatnosci.SetLanguage(language); 115 116 public ActionResult Fail(string id, string language) 117 { 118 _funkcjePlatnosci.SetLanguage(language); 116 119 var id1 = ConvertId(id); 117 var platnosc = _repVPayment.Find(p => p.ID_faktury == id1).SingleOrDefault(); 118 120 var platnosc = _repVPayment.Find(p => p.ID_faktury == id1).SingleOrDefault(); 121 119 122 if (platnosc == null) 120 return View("Error1", _funkcjePlatnosci.InitErrorViewData(_translateManager.Translate("tlumaczenia", "brakdanych"), 0)); 121 122 var invoiceDeatailsViewData = InitInvoiceDetailsViewData(platnosc); 123 return View(invoiceDeatailsViewData); 124 } 125 public ActionResult Form() 126 { 127 return View(); 128 } 123 return View("Error1", 124 _funkcjePlatnosci.InitErrorViewData( 125 _translateManager.Translate("tlumaczenia", "brakdanych"), 0)); 126 127 var invoiceDeatailsViewData = InitInvoiceDetailsViewData(platnosc); 128 return View(invoiceDeatailsViewData); 129 } 130 129 131 public ActionResult Status() 130 132 { 131 132 133 var potwierdzenie = new PotwierdzeniaEcard(); 133 134 var content = new ContentResult(); … … 150 151 if (!String.IsNullOrEmpty(Request.Form["WITHCVC"])) potwierdzenie.WITHCVC = Request.Form["WITHCVC"]; 151 152 153 154 if (!potwierdzenie.ORDERNUMBER.HasValue || potwierdzenie.ORDERNUMBER.Value<=0) 155 { 156 content.Content = "FALSE"; 157 return content; 158 } 159 152 160 _repConfirm.Insert(potwierdzenie); 153 161 -
trunk/eCard/eCardMVC/Platnosci/Global.asax.cs
r948 r967 26 26 "eCard/Status.aspx", 27 27 new { controller = "Platnosc", action = "Status" } 28 ); 28 ); 29 30 routes.MapRoute( 31 "ConfirmationOk", 32 "{language}/Platnosc/Ok/{id}/{order}/", 33 new { controller = "Platnosc", action = "Ok", id="", order="", language="" } 34 ); 35 36 routes.MapRoute( 37 "ConfirmationFail", 38 "{language}/Platnosc/Fail/{id}/", 39 new { controller = "Platnosc", action = "Ok", id = "", order = "", language = "" } 40 ); 41 29 42 routes.MapRoute( 30 43 "Default", -
trunk/eCard/eCardMVC/Platnosci/Models/eCardData.cs
r965 r967 47 47 48 48 #if DEBUG 49 //TODO: find better method to set SystemKsiegowy when testing or developing49 //TODO: find better method to set SystemKsiegowy when testing or developing 50 50 merchant.SystemKsiegowy = "2"; 51 51 #endif … … 60 60 var linkFail = ConfigurationManager.AppSettings["Strona"]; 61 61 linkFail += "/" + lang + ConfigurationManager.AppSettings["LinkFail"]; 62 linkFail += "/" + newPayment.IDFaktury + "?o=" + orderek +"&";62 linkFail += "/" + newPayment.IDFaktury + "?o=" + orderek + "&"; 63 63 64 64 var linkOk = ConfigurationManager.AppSettings["Strona"]; 65 65 linkOk += "/" + lang + ConfigurationManager.AppSettings["LinkOk"]; 66 linkOk += "/" + newPayment.IDFaktury + "?o=" + orderek +"&";66 linkOk += "/" + newPayment.IDFaktury + "?o=" + orderek + "&"; 67 67 68 68 merchant.LinkOk = linkOk; … … 73 73 return merchant; 74 74 } 75 75 76 public void GetMerchantInfo(Merchant merchant) 76 77 { -
trunk/eCard/eCardMVC/Platnosci/Platnosci.Web.csproj.user
r952 r967 14 14 <SQLDebugging>False</SQLDebugging> 15 15 <PublishCopyOption>RunFiles</PublishCopyOption> 16 <PublishTargetLocation> 17 </PublishTargetLocation> 18 <PublishDeleteAllFiles>False</PublishDeleteAllFiles> 19 <PublishCopyAppData>True</PublishCopyAppData> 16 <PublishTargetLocation>C:\Inetpub\wwwroot\eCard\</PublishTargetLocation> 17 <PublishDeleteAllFiles>True</PublishDeleteAllFiles> 18 <PublishCopyAppData>False</PublishCopyAppData> 20 19 <ExternalProgram> 21 20 </ExternalProgram> -
trunk/eCard/eCardMVC/Platnosci/Web.config
r964 r967 35 35 <!--<add key="eCard.Url" value="https://pay.ecard.pl/payment/PS"/>--> 36 36 <!--Wersja DEV--> 37 <add key="wersja" value="TEST"/>38 37 <add key="eCard.Url" value="https://pay.ecard.pl/servlet/PSTEST"/> 39 40 <!--<add key="Strona" value="http://pay.truck-expo.com"/>41 <add key="Css" value="truck"/>-->42 38 43 39 <add key="Strona" value="http://platnosci.admoto.pl"/> … … 45 41 <add key="LinkFail" value="/Platnosc/Fail"/> 46 42 <add key="LinkOk" value="/Platnosc/Ok"/> 47 48 43 </appSettings> 49 44 <elmah>
