* PaypalApiController.cs: starting a paypal account access
* Catalog.xml: tests input with multiple values * FileSystemController.cs: Xml catalog path is now specified ala ~/ * WorkFlowController.cs: Gives the response a message * SimpleFormatter.cs: * FrontOfficeApiController.cs: document formatting * Global.asax.cs: due to refactoring * SimpleJsonPostMethod.cs: (code formatting) * Web.config: due to refactoring * Web.config: - document formatting - PayPal configuration * Web.csproj: references the PayPalCoreSdk.1.6.0 * packages.config: using the .Net 4.5.1 plateform
This commit is contained in:
@ -6,7 +6,8 @@
|
||||
<Slogan>Votre logiciel, efficace, sûr, et sur mesure</Slogan>
|
||||
<Logo>
|
||||
<Src>/images/logoDev.png</Src>
|
||||
<Alt></Alt>
|
||||
<Alt>
|
||||
</Alt>
|
||||
</Logo>
|
||||
<Categories>
|
||||
<ProductCategory>
|
||||
@ -41,22 +42,28 @@
|
||||
<FormElement xsi:type="Text">
|
||||
<Val>Choisissez le type d'intervention souhaité: </Val>
|
||||
</FormElement>
|
||||
|
||||
<FormElement xsi:type="SelectInput">
|
||||
<Id>ad</Id>
|
||||
<Items>
|
||||
<Option>
|
||||
<value>d</value>
|
||||
<Text>à distance</Text>
|
||||
</Option>
|
||||
<Option>
|
||||
<value>s</value>
|
||||
<Text>sur site</Text>
|
||||
</Option>
|
||||
</Items>
|
||||
<SelectedIndex>0</SelectedIndex>
|
||||
</FormElement>
|
||||
<FormElement xsi:type="TextInput">
|
||||
<Id>testarray[]</Id>
|
||||
<Value xsi:type="xsd:string">xxxxxxxxxx</Value>
|
||||
</FormElement>
|
||||
<FormElement xsi:type="TextInput">
|
||||
<Id>testarray[]</Id>
|
||||
<Value xsi:type="xsd:string"></Value>
|
||||
</FormElement>
|
||||
<FormElement xsi:type="SelectInput">
|
||||
<Id>ad</Id>
|
||||
<Items>
|
||||
<string>à distance</string>
|
||||
<string>sur site</string>
|
||||
</Items>
|
||||
<SelectedIndex>0</SelectedIndex>
|
||||
<Value xsi:type="xsd:string">
|
||||
</Value>
|
||||
</FormElement>
|
||||
</Items>
|
||||
</DefaultForm>
|
||||
|
@ -14,7 +14,8 @@ namespace Yavsc.Controllers
|
||||
/// </summary>
|
||||
public class FileSystemController : Controller
|
||||
{
|
||||
private static string usersDir ="~/users";
|
||||
private static string usersDir = "~/users";
|
||||
|
||||
/// <summary>
|
||||
/// Gets the users dir.
|
||||
/// </summary>
|
||||
@ -24,48 +25,51 @@ namespace Yavsc.Controllers
|
||||
return usersDir;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Index this instance.
|
||||
/// </summary>
|
||||
[Authorize]
|
||||
public ActionResult Index()
|
||||
public ActionResult Index ()
|
||||
{
|
||||
string user = Membership.GetUser ().UserName;
|
||||
ViewData ["UserName"] = user;
|
||||
|
||||
DirectoryInfo di = new DirectoryInfo (
|
||||
Path.Combine(
|
||||
Server.MapPath(UsersDir),
|
||||
Path.Combine (
|
||||
Server.MapPath (UsersDir),
|
||||
user));
|
||||
if (!di.Exists)
|
||||
di.Create ();
|
||||
return View (new FileInfoCollection( di.GetFiles()));
|
||||
return View (new FileInfoCollection (di.GetFiles ()));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Details the specified id.
|
||||
/// </summary>
|
||||
/// <param name="id">Identifier.</param>
|
||||
public ActionResult Details(string id)
|
||||
public ActionResult Details (string id)
|
||||
{
|
||||
foreach (char x in Path.GetInvalidPathChars()) {
|
||||
if (id.Contains (x)) {
|
||||
ViewData ["Message"] =
|
||||
string.Format (
|
||||
"Something went wrong following the following path : {0} (\"{1}\")",
|
||||
id,x);
|
||||
id, x);
|
||||
return RedirectToAction ("Index");
|
||||
}
|
||||
}
|
||||
string fpath = Path.Combine (BaseDir, id);
|
||||
ViewData["Content"] = Url.Content (fpath);
|
||||
ViewData ["Content"] = Url.Content (fpath);
|
||||
FileInfo fi = new FileInfo (fpath);
|
||||
|
||||
return View (fi);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create this instance.
|
||||
/// </summary>
|
||||
public ActionResult Create()
|
||||
public ActionResult Create ()
|
||||
{
|
||||
return View ();
|
||||
}
|
||||
@ -76,36 +80,32 @@ namespace Yavsc.Controllers
|
||||
/// <param name="collection">Collection.</param>
|
||||
[HttpPost]
|
||||
[Authorize]
|
||||
public ActionResult Create(FormCollection collection)
|
||||
public ActionResult Create (FormCollection collection)
|
||||
{
|
||||
try {
|
||||
string fnre = "[A-Za-z0-9~\\-.]+";
|
||||
HttpFileCollectionBase hfc = Request.Files;
|
||||
|
||||
for (int i=0; i<hfc.Count; i++)
|
||||
{
|
||||
if (!Regex.Match(hfc[i].FileName,fnre).Success)
|
||||
{
|
||||
ViewData ["Message"] += string.Format("<p>File name '{0}' refused</p>",hfc[i].FileName);
|
||||
ModelState.AddModelError(
|
||||
for (int i = 0; i < hfc.Count; i++) {
|
||||
if (!Regex.Match (hfc [i].FileName, fnre).Success) {
|
||||
ViewData ["Message"] += string.Format ("<p>File name '{0}' refused</p>", hfc [i].FileName);
|
||||
ModelState.AddModelError (
|
||||
"AFile",
|
||||
string.Format(
|
||||
string.Format (
|
||||
"The file name {0} dosn't match an acceptable file name {1}",
|
||||
hfc[i].FileName,fnre))
|
||||
;
|
||||
return View();
|
||||
hfc [i].FileName, fnre));
|
||||
return View ();
|
||||
}
|
||||
}
|
||||
for (int i=0; i<hfc.Count; i++)
|
||||
{
|
||||
for (int i = 0; i < hfc.Count; i++) {
|
||||
// TODO Limit with hfc[h].ContentLength
|
||||
string filename = Path.Combine(Server.MapPath(BaseDir),hfc[i].FileName);
|
||||
hfc[i].SaveAs(filename);
|
||||
ViewData ["Message"] += string.Format("<p>File name '{0}' saved</p>",hfc[i].FileName);
|
||||
string filename = Path.Combine (Server.MapPath (BaseDir), hfc [i].FileName);
|
||||
hfc [i].SaveAs (filename);
|
||||
ViewData ["Message"] += string.Format ("<p>File name '{0}' saved</p>", hfc [i].FileName);
|
||||
}
|
||||
return RedirectToAction ("Index","FileSystem");
|
||||
return RedirectToAction ("Index", "FileSystem");
|
||||
} catch (Exception e) {
|
||||
ViewData ["Message"] = "Exception:"+e.Message;
|
||||
ViewData ["Message"] = "Exception:" + e.Message;
|
||||
return View ();
|
||||
}
|
||||
}
|
||||
@ -115,21 +115,23 @@ namespace Yavsc.Controllers
|
||||
/// </summary>
|
||||
/// <value>The base dir.</value>
|
||||
public static string BaseDir { get { return Path.Combine (UsersDir, Membership.GetUser ().UserName); } }
|
||||
|
||||
/// <summary>
|
||||
/// Edit the specified id.
|
||||
/// </summary>
|
||||
/// <param name="id">Identifier.</param>
|
||||
public ActionResult Edit(int id)
|
||||
public ActionResult Edit (int id)
|
||||
{
|
||||
return View ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Edit the specified id and collection.
|
||||
/// </summary>
|
||||
/// <param name="id">Identifier.</param>
|
||||
/// <param name="collection">Collection.</param>
|
||||
[HttpPost]
|
||||
public ActionResult Edit(int id, FormCollection collection)
|
||||
public ActionResult Edit (int id, FormCollection collection)
|
||||
{
|
||||
try {
|
||||
return RedirectToAction ("Index");
|
||||
@ -137,21 +139,23 @@ namespace Yavsc.Controllers
|
||||
return View ();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete the specified id.
|
||||
/// </summary>
|
||||
/// <param name="id">Identifier.</param>
|
||||
public ActionResult Delete(int id)
|
||||
public ActionResult Delete (int id)
|
||||
{
|
||||
return View ();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Delete the specified id and collection.
|
||||
/// </summary>
|
||||
/// <param name="id">Identifier.</param>
|
||||
/// <param name="collection">Collection.</param>
|
||||
[HttpPost]
|
||||
public ActionResult Delete(int id, FormCollection collection)
|
||||
public ActionResult Delete (int id, FormCollection collection)
|
||||
{
|
||||
try {
|
||||
return RedirectToAction ("Index");
|
||||
|
@ -49,23 +49,23 @@ namespace Yavsc.ApiControllers
|
||||
/// <summary>
|
||||
/// Catalog this instance.
|
||||
/// </summary>
|
||||
[AcceptVerbs("GET")]
|
||||
[AcceptVerbs ("GET")]
|
||||
public Catalog Catalog ()
|
||||
{
|
||||
Catalog c = CatalogManager.GetCatalog (Request.RequestUri.AbsolutePath);
|
||||
return c;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the product categorie.
|
||||
/// </summary>
|
||||
/// <returns>The product categorie.</returns>
|
||||
/// <param name="brandName">Brand name.</param>
|
||||
/// <param name="prodCategorie">Prod categorie.</param>
|
||||
[AcceptVerbs("GET")]
|
||||
[AcceptVerbs ("GET")]
|
||||
public ProductCategory GetProductCategorie (string brandName, string prodCategorie)
|
||||
{
|
||||
return CatalogManager.GetCatalog (Request.RequestUri.AbsolutePath).GetBrand (brandName).GetProductCategory (prodCategorie)
|
||||
;
|
||||
return CatalogManager.GetCatalog (Request.RequestUri.AbsolutePath).GetBrand (brandName).GetProductCategory (prodCategorie);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@ -81,30 +81,32 @@ namespace Yavsc.ApiControllers
|
||||
return est;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Gets the estim tex.
|
||||
/// </summary>
|
||||
/// <returns>The estim tex.</returns>
|
||||
/// <param name="estimid">Estimid.</param>
|
||||
[AcceptVerbs("GET")]
|
||||
public HttpResponseMessage GetEstimTex(long estimid)
|
||||
[AcceptVerbs ("GET")]
|
||||
public HttpResponseMessage GetEstimTex (long estimid)
|
||||
{
|
||||
string texest = null;
|
||||
try {
|
||||
texest = getEstimTex (estimid);
|
||||
}
|
||||
catch (TemplateException ex) {
|
||||
return new HttpResponseMessage (HttpStatusCode.OK){ Content =
|
||||
} catch (TemplateException ex) {
|
||||
return new HttpResponseMessage (HttpStatusCode.OK) { Content =
|
||||
new ObjectContent (typeof(string),
|
||||
ex.Message, new ErrorHtmlFormatter(HttpStatusCode.NotAcceptable,
|
||||
ex.Message, new ErrorHtmlFormatter (HttpStatusCode.NotAcceptable,
|
||||
LocalizedText.DocTemplateException
|
||||
))};
|
||||
}
|
||||
catch (Exception ex) {
|
||||
))
|
||||
};
|
||||
} catch (Exception ex) {
|
||||
|
||||
return new HttpResponseMessage (HttpStatusCode.OK){ Content =
|
||||
return new HttpResponseMessage (HttpStatusCode.OK) { Content =
|
||||
new ObjectContent (typeof(string),
|
||||
ex.Message, new SimpleFormatter("text/text")) };
|
||||
ex.Message, new SimpleFormatter ("text/text"))
|
||||
};
|
||||
}
|
||||
if (texest == null)
|
||||
return new HttpResponseMessage (HttpStatusCode.OK) { Content =
|
||||
@ -119,20 +121,20 @@ namespace Yavsc.ApiControllers
|
||||
};
|
||||
}
|
||||
|
||||
private string getEstimTex(long estimid)
|
||||
private string getEstimTex (long estimid)
|
||||
{
|
||||
Yavsc.templates.Estim tmpe = new Yavsc.templates.Estim();
|
||||
Yavsc.templates.Estim tmpe = new Yavsc.templates.Estim ();
|
||||
Estimate e = wfmgr.GetEstimate (estimid);
|
||||
tmpe.Session = new Dictionary<string,object>();
|
||||
tmpe.Session = new Dictionary<string,object> ();
|
||||
tmpe.Session.Add ("estim", e);
|
||||
|
||||
Profile prpro = new Profile(ProfileBase.Create(e.Responsible));
|
||||
Profile prpro = new Profile (ProfileBase.Create (e.Responsible));
|
||||
if (!prpro.HasBankAccount)
|
||||
throw new TemplateException ("NotBankable:"+e.Responsible);
|
||||
throw new TemplateException ("NotBankable:" + e.Responsible);
|
||||
|
||||
Profile prcli = new Profile(ProfileBase.Create(e.Client));
|
||||
Profile prcli = new Profile (ProfileBase.Create (e.Client));
|
||||
if (!prcli.IsBillable)
|
||||
throw new TemplateException ("NotBillable:"+e.Client);
|
||||
throw new TemplateException ("NotBillable:" + e.Client);
|
||||
tmpe.Session.Add ("from", prpro);
|
||||
tmpe.Session.Add ("to", prcli);
|
||||
tmpe.Init ();
|
||||
@ -145,7 +147,7 @@ namespace Yavsc.ApiControllers
|
||||
/// </summary>
|
||||
/// <returns>The estim pdf.</returns>
|
||||
/// <param name="estimid">Estimid.</param>
|
||||
public HttpResponseMessage GetEstimPdf(long estimid)
|
||||
public HttpResponseMessage GetEstimPdf (long estimid)
|
||||
{
|
||||
Estimate estim = wfmgr.GetEstimate (estimid);
|
||||
//TODO better with pro.IsBankable && cli.IsBillable
|
||||
|
48
web/Controllers/PaypalApiController.cs
Normal file
48
web/Controllers/PaypalApiController.cs
Normal file
@ -0,0 +1,48 @@
|
||||
//
|
||||
// PaypalApiController.cs
|
||||
//
|
||||
// Author:
|
||||
// Paul Schneider <paulschneider@free.fr>
|
||||
//
|
||||
// Copyright (c) 2015 Paul Schneider
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU Lesser General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Lesser General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
using System;
|
||||
using System.Web.Http;
|
||||
|
||||
#if HASPAYPALAPI
|
||||
|
||||
using PayPal.Api;
|
||||
|
||||
namespace Yavsc.ApiControllers
|
||||
{
|
||||
public class PaypalApiController: ApiController
|
||||
{
|
||||
public void GetPayments()
|
||||
{
|
||||
OAuthTokenCredential tokenCredential =
|
||||
new OAuthTokenCredential("<CLIENT_ID>", "<CLIENT_SECRET>");
|
||||
|
||||
string accessToken = tokenCredential.GetAccessToken();
|
||||
var parameters = new PayPal.Util.QueryParameters();
|
||||
parameters.Add ("Count", "10");
|
||||
|
||||
PaymentHistory paymentHistory = Payment.Get(apiContext, accessToken, parameters);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -108,7 +108,7 @@ namespace Yavsc.ApiControllers
|
||||
public HttpResponseMessage UpdateWritting([FromBody] Writting wr)
|
||||
{
|
||||
wfmgr.UpdateWritting (wr);
|
||||
return Request.CreateResponse (System.Net.HttpStatusCode.OK);
|
||||
return Request.CreateResponse<string> (System.Net.HttpStatusCode.OK,"WrittingUpdated:"+wr.Id);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -84,8 +84,6 @@ namespace Yavsc.Formatters
|
||||
writer.Write (doc);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@ using System.Web.Mvc;
|
||||
using System.Web.Routing;
|
||||
using System.Web.Http;
|
||||
using Yavsc.Formatters;
|
||||
using Yavsc.Model.FrontOffice;
|
||||
|
||||
namespace Yavsc
|
||||
{
|
||||
|
@ -74,7 +74,8 @@ namespace Yavsc.Helpers
|
||||
/// <param name="query">Query.</param>
|
||||
public TAnswer Invoke(TQuery query)
|
||||
{
|
||||
Byte[] bytes = System.Text.Encoding.UTF8.GetBytes (JsonConvert.SerializeObject(query));
|
||||
Byte[] bytes = System.Text.Encoding.UTF8.GetBytes (
|
||||
JsonConvert.SerializeObject(query));
|
||||
Request.ContentLength = bytes.Length;
|
||||
|
||||
using (Stream dataStream = Request.GetRequestStream ()) {
|
||||
|
@ -20,7 +20,6 @@
|
||||
<add tagPrefix="yavsc" namespace="Yavsc.WebControls" assembly="Yavsc.WebControls" />
|
||||
</controls>
|
||||
<namespaces>
|
||||
<add namespace="SalesCatalog.Model" />
|
||||
<add namespace="Yavsc.Helpers" />
|
||||
<add namespace="Yavsc.Admin" />
|
||||
<add namespace="Yavsc.CatExts" />
|
||||
@ -29,6 +28,8 @@
|
||||
<add namespace="Yavsc.Model.Blogs" />
|
||||
<add namespace="Yavsc.Model.WorkFlow" />
|
||||
<add namespace="Yavsc.Model.Google" />
|
||||
<add namespace="Yavsc.Model.FrontOffice" />
|
||||
|
||||
</namespaces>
|
||||
</pages>
|
||||
</system.web>
|
||||
|
@ -8,12 +8,8 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
-->
|
||||
<configuration>
|
||||
<configSections>
|
||||
<sectionGroup
|
||||
name="system.web.extensions"
|
||||
type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<sectionGroup
|
||||
name="scripting"
|
||||
type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication" />
|
||||
<sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
|
||||
<section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere" />
|
||||
@ -23,23 +19,14 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
</sectionGroup>
|
||||
</sectionGroup>
|
||||
</sectionGroup>
|
||||
<section name="paypal" type="PayPal.SDKConfigHandler, PayPal" />
|
||||
<section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" />
|
||||
<sectionGroup name="system.web">
|
||||
<section name="blog" type="Yavsc.Model.Blogs.Configuration.BlogProvidersConfigurationSection, YavscModel" allowLocation="true" requirePermission="false" allowDefinition="Everywhere" />
|
||||
<section name="thanks" type="Yavsc.ThanksConfigurationSection, Yavsc" allowLocation="true" requirePermission="false" allowDefinition="Everywhere" />
|
||||
<section name="catalog" type="SalesCatalog.Configuration.CatalogProvidersConfigurationSection, SalesCatalog" allowLocation="true" requirePermission="false" allowDefinition="Everywhere" />
|
||||
<section name="catalog" type="Yavsc.Model.FrontOffice.Configuration.CatalogProvidersConfigurationSection, YavscModel" allowLocation="true" requirePermission="false" allowDefinition="Everywhere" />
|
||||
<section name="workflow" type="Yavsc.Model.WorkFlow.Configuration.WorkflowConfiguration, YavscModel" allowLocation="true" requirePermission="false" allowDefinition="Everywhere" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection, DotNetOpenAuth.Core">
|
||||
<section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
|
||||
<section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
|
||||
<section name="openid" type="DotNetOpenAuth.Configuration.OpenIdElement, DotNetOpenAuth.OpenId" requirePermission="false" allowLocation="true" />
|
||||
</sectionGroup>
|
||||
<sectionGroup name="dotNetOpenAuth" type="DotNetOpenAuth.Configuration.DotNetOpenAuthSection, DotNetOpenAuth.Core">
|
||||
<section name="messaging" type="DotNetOpenAuth.Configuration.MessagingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
|
||||
<section name="reporting" type="DotNetOpenAuth.Configuration.ReportingElement, DotNetOpenAuth.Core" requirePermission="false" allowLocation="true" />
|
||||
<section name="oauth" type="DotNetOpenAuth.Configuration.OAuthElement, DotNetOpenAuth.OAuth" requirePermission="false" allowLocation="true" />
|
||||
<section name="openid" type="DotNetOpenAuth.Configuration.OpenIdElement, DotNetOpenAuth.OpenId" requirePermission="false" allowLocation="true" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<runtime>
|
||||
<!--
|
||||
@ -93,12 +80,12 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
<add assembly="Microsoft.Build.Utilities.v12.0, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="Microsoft.Build, Version=12.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Net, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
<add assembly="System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.Http, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.Http.WebHost, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Json, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Web.WebPages, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
<add assembly="System.Net.Http.Formatting, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<customErrors mode="Off" />
|
||||
@ -204,6 +191,7 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
</thanks>
|
||||
<!-- <machineKey validationKey="13CA2E37A5A99AD8CE4A6B895BAF0ED3A022AA584B8D922256BA072189CEB085EEB4E573CA833D9B34FBF68687F6A6B3E008FB4EB67585A4D90551B9D36D42A1" decryptionKey="DA89CC83F6FB2EB12D5929DABC89299AC3928E0751705D33D02DB4162ED56536" validation="SHA1" decryption="AES" /> -->
|
||||
<!--- <sessionState cookieless="true" regenerateExpiredSessionId="true" timeout="120"/> -->
|
||||
<trust level="High" />
|
||||
</system.web>
|
||||
<system.codedom>
|
||||
<compilers>
|
||||
@ -296,6 +284,35 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
<authentication mode="Forms">
|
||||
<forms loginUrl="~/Account/Login" timeout="30" name=".ASPXFORM$" path="/" requireSSL="false" slidingExpiration="true" defaultUrl="Index.aspx" enableCrossAppRedirects="false" />
|
||||
</authentication>
|
||||
<!-- PayPal SDK settings -->
|
||||
<paypal>
|
||||
<settings>
|
||||
<add name="mode" value="sandbox" />
|
||||
<!-- live or sandbox -->
|
||||
<add name="connectionTimeout" value="30000" />
|
||||
<!-- (miliseconds) = 30s -->
|
||||
<add name="requestRetries" value="1" />
|
||||
<!-- -->
|
||||
<add name="clientId" value="A9S6jrem3H0gdj8tQ2q1ahSCU38tAJRyiro7eED13h3Syn6C9ZSKSRkl" />
|
||||
<!-- -->
|
||||
<add name="clientSecret" value="PLF77VGTZGGSSZAY" />
|
||||
<!-- -->
|
||||
</settings>
|
||||
</paypal>
|
||||
<!-- log4net settings -->
|
||||
<log4net>
|
||||
<appender name="FileAppender" type="log4net.Appender.FileAppender">
|
||||
<file value="yavsc.log" />
|
||||
<appendToFile value="true" />
|
||||
<layout type="log4net.Layout.PatternLayout">
|
||||
<conversionPattern value="%date [%thread] %-5level %logger [%property{NDC}] %message%newline" />
|
||||
</layout>
|
||||
</appender>
|
||||
<root>
|
||||
<level value="DEBUG" />
|
||||
<appender-ref ref="FileAppender" />
|
||||
</root>
|
||||
</log4net>
|
||||
<connectionStrings>
|
||||
<add name="yavsc" connectionString="Server=127.0.0.1;Port=5432;Database=yavsc;User Id=yavsc;Password=admin;Encoding=Unicode;" providerName="Npgsql" />
|
||||
</connectionStrings>
|
||||
@ -312,5 +329,6 @@ http://msdn2.microsoft.com/en-us/library/b5ysx397.aspx
|
||||
<add key="RegistrationMessage" value="/RegistrationMail.txt" />
|
||||
<add key="ClientValidationEnabled" value="true" />
|
||||
<add key="UnobtrusiveJavaScriptEnabled" value="true" />
|
||||
<add key="PayPalLogger" value="PayPal.Log.Log4netLogger" />
|
||||
</appSettings>
|
||||
</configuration>
|
@ -9,7 +9,7 @@
|
||||
<ProjectTypeGuids>{349C5851-65DF-11DA-9384-00065B846F21};{603C0E0B-DB56-11DC-BE95-000D561079B0};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<OutputType>Library</OutputType>
|
||||
<RootNamespace>Yavsc</RootNamespace>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
@ -88,10 +88,13 @@
|
||||
<Reference Include="System.Net.Http.WebRequest" />
|
||||
<Reference Include="System.Web.Mvc" />
|
||||
<Reference Include="System.Web.Http" />
|
||||
<Reference Include="System.Net.Http.Formatting" />
|
||||
<Reference Include="System.Web.Http.WebHost" />
|
||||
<Reference Include="System.Json" />
|
||||
<Reference Include="System.Web.WebPages" />
|
||||
<Reference Include="PayPalCoreSDK">
|
||||
<HintPath>..\packages\PayPalCoreSDK.1.6.0\lib\net451\PayPalCoreSDK.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Net.Http.Formatting" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Models\" />
|
||||
@ -124,6 +127,7 @@
|
||||
<Folder Include="htmldoc\" />
|
||||
<Folder Include="users\" />
|
||||
<Folder Include="xmldoc\" />
|
||||
<Folder Include="Views\PayPal\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Controllers\HomeController.cs" />
|
||||
@ -179,6 +183,7 @@
|
||||
<Compile Include="Helpers\Google\CalendarApi.cs" />
|
||||
<Compile Include="Formatters\ErrorHtmlFormatter.cs" />
|
||||
<Compile Include="Formatters\RssFeedsFormatter.cs" />
|
||||
<Compile Include="Controllers\PaypalApiController.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Content Include="Views\Web.config" />
|
||||
|
@ -3,4 +3,6 @@
|
||||
<package id="jQuery" version="2.1.3" targetFramework="net45" />
|
||||
<package id="jquery-globalize" version="0.1.3" targetFramework="net45" />
|
||||
<package id="log4net" version="2.0.3" targetFramework="net40" />
|
||||
<package id="Newtonsoft.Json" version="5.0.6" targetFramework="net45" />
|
||||
<package id="PayPalCoreSDK" version="1.6.0" targetFramework="net451" />
|
||||
</packages>
|
Reference in New Issue
Block a user