Zbiór zmian 970 dla trunk/eCard/eCardMVC/Platnosci
- Data:
- 2009-12-23 11:26:06 (16 years ago)
- Lokalizacja:
- trunk/eCard/eCardMVC/Platnosci
- Pliki:
-
- 7 zmodyfikowane
-
Controllers/AccountController.cs (zmodyfikowane) (4 diffs)
-
Controllers/MerchantController.cs (zmodyfikowane) (4 diffs)
-
Controllers/PlatnoscController.cs (zmodyfikowane) (6 diffs)
-
Models/FunkcjePlatnosci.cs (zmodyfikowane) (6 diffs)
-
Models/InvoiceDetailsViewData.cs (zmodyfikowane) (2 diffs)
-
Models/eCardData.cs (zmodyfikowane) (2 diffs)
-
Platnosci.Web.csproj (zmodyfikowane) (2 diffs)
Legenda:
- Bez zmian
- Dodane
- Usunięte
-
trunk/eCard/eCardMVC/Platnosci/Controllers/AccountController.cs
r950 r970 3 3 using System.Web.Mvc; 4 4 using System.Web.Security; 5 using Platnosci.Core.Linq; 5 using adMoto.Payments.Core; 6 using adMoto.Payments.Core.Data; 7 using adMoto.Payments.Core.Interfaces; 6 8 using Platnosci.Models; 7 using Platnosci.Core.Interface;8 9 9 10 namespace Platnosci.Controllers … … 12 13 public class AccountController : Controller 13 14 { 14 private readonly IRepository< vPlatnosciEcard> _repository;15 private readonly IRepository<Invoice> _repository; 15 16 private readonly FunkcjePlatnosci _funkcjePlatnosci; 16 17 … … 23 24 public AccountController() 24 25 { 25 _repository = new Repository< vPlatnosciEcard>(new DataContext());26 _repository = new Repository<Invoice>(new DataContext()); 26 27 FormsAuth = new FormsAuthenticationService(); 27 28 _funkcjePlatnosci = new FunkcjePlatnosci(); 28 29 } 29 30 30 public AccountController(IFormsAuthentication formsAuth, IRepository< vPlatnosciEcard> repository, FunkcjePlatnosci func)31 public AccountController(IFormsAuthentication formsAuth, IRepository<Invoice> repository, FunkcjePlatnosci func) 31 32 { 32 33 _repository = repository; … … 50 51 { 51 52 _funkcjePlatnosci.SetLanguage(language); 52 var platnosc = new vPlatnosciEcard();53 var platnosc = new Invoice(); 53 54 if (!ValidateLogOn(nip, numerFaktury)) 54 55 { -
trunk/eCard/eCardMVC/Platnosci/Controllers/MerchantController.cs
r959 r970 2 2 using System.Linq; 3 3 using System.Web.Mvc; 4 using adMoto.Payments.Core; 5 using adMoto.Payments.Core.Data; 6 using adMoto.Payments.Core.Interfaces; 4 7 using Platnosci.Models; 5 using Platnosci.Core.Linq;6 using Platnosci.Core.Interface;7 using System.Configuration;8 using System.Net;9 using System.IO;10 using System.Threading;11 8 12 9 namespace Platnosci.Controllers … … 15 12 public class MerchantController : Controller 16 13 { 17 private readonly IRepository< vPlatnosciEcard> _repVPayment;14 private readonly IRepository<Invoice> _repVPayment; 18 15 private readonly IRepository<PlatnosciEcard> _repPayment; 19 16 private readonly FunkcjePlatnosci _funkcjePlatnosci; … … 23 20 public MerchantController() 24 21 { 25 _repVPayment = new Repository< vPlatnosciEcard>(new DataContext());22 _repVPayment = new Repository<Invoice>(new DataContext()); 26 23 _repPayment = new Repository<PlatnosciEcard>(new DataContext()); 27 24 _funkcjePlatnosci = new FunkcjePlatnosci(_repPayment); … … 29 26 _eCardData = new eCardData(_repPayment); 30 27 } 31 public MerchantController(IRepository< vPlatnosciEcard> repVPayment, IRepository<PlatnosciEcard> repPayment, ITranslateManager translate)28 public MerchantController(IRepository<Invoice> repVPayment, IRepository<PlatnosciEcard> repPayment, ITranslateManager translate) 32 29 { 33 30 _repVPayment = repVPayment; -
trunk/eCard/eCardMVC/Platnosci/Controllers/PlatnoscController.cs
r969 r970 1 1 using System; 2 2 using System.Linq; 3 using System.Web;4 3 using System.Web.Mvc; 4 using adMoto.Payments.Core; 5 using adMoto.Payments.Core.Data; 6 using adMoto.Payments.Core.Interfaces; 5 7 using Elmah; 6 8 using Platnosci.Models; 7 using Platnosci.Core.Linq;8 using Platnosci.Core.Interface;9 using ApplicationException=Elmah.ApplicationException;10 9 11 10 namespace Platnosci.Controllers 12 11 { 13 14 //[Authorize]15 12 public class PlatnoscController : Controller 16 13 { 17 14 public const string ISPAID = "payment_deposited"; //transakcja potwierdzona do rozliczenia 18 private readonly IRepository< vPlatnosciEcard> _repVPayment;15 private readonly IRepository<Invoice> _repVPayment; 19 16 private readonly IRepository<PlatnosciEcard> _repPayment; 20 17 private readonly IRepository<PotwierdzeniaEcard> _repConfirm; … … 24 21 public PlatnoscController() 25 22 { 26 _repVPayment = new Repository< vPlatnosciEcard>(new DataContext());23 _repVPayment = new Repository<Invoice>(new DataContext()); 27 24 _repPayment = new Repository<PlatnosciEcard>(new DataContext()); 28 25 _repConfirm = new Repository<PotwierdzeniaEcard>(new DataContext()); … … 30 27 _translateManager = new Translation(); 31 28 } 32 public PlatnoscController(IRepository< vPlatnosciEcard> repVPayment, IRepository<PlatnosciEcard> repPayment, IRepository<PotwierdzeniaEcard> repConfirm, ITranslateManager translate)29 public PlatnoscController(IRepository<Invoice> repVPayment, IRepository<PlatnosciEcard> repPayment, IRepository<PotwierdzeniaEcard> repConfirm, ITranslateManager translate) 33 30 { 34 31 _repVPayment = repVPayment; … … 64 61 return View(invoiceDeatailsViewData); 65 62 } 63 66 64 [Authorize] 67 65 [AcceptVerbs(HttpVerbs.Post)] … … 139 137 public ActionResult Status() 140 138 { 141 ErrorSignal.FromCurrentContext().Raise(new Exception(), System.Web.HttpContext.Current); 139 if (System.Web.HttpContext.Current != null) 140 ErrorSignal.FromCurrentContext().Raise(new Exception(), System.Web.HttpContext.Current); 142 141 143 142 var potwierdzenie = new PotwierdzeniaEcard(); … … 201 200 } 202 201 203 private InvoiceDetailsViewData InitInvoiceDetailsViewData( vPlatnosciEcardplatnosc)202 private InvoiceDetailsViewData InitInvoiceDetailsViewData(Invoice platnosc) 204 203 { 205 204 var invoiceDeatailsViewData = new InvoiceDetailsViewData(); -
trunk/eCard/eCardMVC/Platnosci/Models/FunkcjePlatnosci.cs
r966 r970 1 1 using System; 2 2 using System.Web; 3 using Platnosci.Core.Linq;4 3 using System.Threading; 5 4 using System.Globalization; 6 5 using System.Configuration; 7 6 using System.Security.Principal; 8 using Platnosci.Core.Interface; 7 using adMoto.Payments.Core; 8 using adMoto.Payments.Core.Data; 9 using adMoto.Payments.Core.Interfaces; 9 10 10 11 … … 50 51 } 51 52 52 public bool UserIdentity( vPlatnosciEcardplatnosc, string userName)53 public bool UserIdentity(Invoice platnosc, string userName) 53 54 { 54 55 return platnosc != null && platnosc.nip == userName; 55 56 } 56 57 57 public Waluta SetAmount( vPlatnosciEcardplatnosc)58 public Waluta SetAmount(Invoice platnosc) 58 59 { 59 60 var waluta = new Waluta(); … … 122 123 var css = ConfigurationManager.AppSettings["Css"]; 123 124 124 if (css == "truck") 125 str = HttpContext.GetGlobalResourceObject("tlumaczenia", "adresTruck") + " - "; 126 else if (css == "admoto") 127 str = HttpContext.GetGlobalResourceObject("tlumaczenia", "adresAdmoto") + " - "; 125 switch (css) 126 { 127 case "truck": 128 str = HttpContext.GetGlobalResourceObject("tlumaczenia", "adresTruck") + " - "; 129 break; 130 case "admoto": 131 str = HttpContext.GetGlobalResourceObject("tlumaczenia", "adresAdmoto") + " - "; 132 break; 133 } 128 134 129 135 return str; … … 142 148 return er; 143 149 } 144 public PlatnosciEcard CreateAndAddNewPyment( vPlatnosciEcardplatnosc, Waluta waluta, Payer payer, string sessionId)150 public PlatnosciEcard CreateAndAddNewPyment(Invoice platnosc, Waluta waluta, Payer payer, string sessionId) 145 151 { 146 152 var newPayment = new PlatnosciEcard(); … … 167 173 return newPayment; 168 174 } 169 public ErrorViewData IsError(vPlatnosciEcard platnosc, String UserName) 175 176 public ErrorViewData IsError(Invoice platnosc, String UserName) 170 177 { 171 178 var errortxt = ""; … … 178 185 return InitErrorViewData(errortxt, 0); 179 186 } 187 180 188 public string GetLanguage() 181 189 { 182 stringlanguage = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.ToUpper();190 var language = Thread.CurrentThread.CurrentUICulture.TwoLetterISOLanguageName.ToUpper(); 183 191 184 192 if (language != "PL" && language != "EN" && language != "DE") 185 193 return "PL"; //domyślny jezyk, w ktorym ma byc wyświetlony formularz na stronie eCard 186 else187 return language;194 195 return language; 188 196 } 189 197 } -
trunk/eCard/eCardMVC/Platnosci/Models/InvoiceDetailsViewData.cs
r951 r970 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using System.Web.Mvc; 6 using Platnosci.Core.Linq; 7 1 using adMoto.Payments.Core; 2 using adMoto.Payments.Core.Data; 8 3 9 4 namespace Platnosci.Models … … 11 6 public class InvoiceDetailsViewData 12 7 { 13 public vPlatnosciEcardvPlatnosciEcard { get; set; }8 public Invoice vPlatnosciEcard { get; set; } 14 9 public Payer Payer {get; set;} 15 10 public string brutto { get; set; } -
trunk/eCard/eCardMVC/Platnosci/Models/eCardData.cs
r968 r970 4 4 using System.Linq; 5 5 using System.Configuration; 6 using Platnosci.Core.Linq; 7 using Platnosci.Core.Interface; 6 using adMoto.Payments.Core; 7 using adMoto.Payments.Core.Data; 8 using adMoto.Payments.Core.Interfaces; 8 9 9 10 namespace Platnosci.Models … … 38 39 return dane; 39 40 } 40 public Merchant CreateMerchantData( vPlatnosciEcardinvoice, Payer payer, string lang, string sessionId)41 public Merchant CreateMerchantData(Invoice invoice, Payer payer, string lang, string sessionId) 41 42 { 42 43 var merchant = new Merchant(); -
trunk/eCard/eCardMVC/Platnosci/Platnosci.Web.csproj
r969 r970 129 129 </ItemGroup> 130 130 <ItemGroup> 131 <ProjectReference Include="..\Platnosci.Core\Platnosci.Core.csproj">132 <Project>{329506B5-F705-46AE-A31D-799141FEA70E}</Project>133 <Name>Platnosci.Core</Name>134 </ProjectReference>135 </ItemGroup>136 <ItemGroup>137 131 <Content Include="Content\admoto.css" /> 138 132 <Content Include="Content\truck.css" /> … … 187 181 <Content Include="Views\Platnosc\Paid.aspx" /> 188 182 <Content Include="Views\Platnosc\Status.aspx" /> 183 </ItemGroup> 184 <ItemGroup> 185 <ProjectReference Include="..\adMoto.Payments.Core\adMoto.Payments.Core.csproj"> 186 <Project>{C14BEFFA-8EAC-4E07-AEB2-27D2B3E46469}</Project> 187 <Name>adMoto.Payments.Core</Name> 188 </ProjectReference> 189 189 </ItemGroup> 190 190 <ItemGroup>
