going to live

This commit is contained in:
2017-05-16 20:58:52 +02:00
parent 285f83523b
commit 7b33a83298
21 changed files with 2495 additions and 183 deletions

View File

@ -88,13 +88,15 @@ namespace Yavsc.ApiControllers
[HttpPost("createpayment/{id}")] [HttpPost("createpayment/{id}")]
public async Task<IActionResult> CreatePayment(long id) public async Task<IActionResult> CreatePayment(long id)
{ {
var apiContext = _paymentSettings.CreateAPIContext(); var apiContext = PayPalHelpers.CreateAPIContext();
var query = await _context.HairCutQueries.Include(q => q.Client). var query = await _context.HairCutQueries.Include(q => q.Client).
Include(q => q.Client.PostalAddress).Include(q => q.Prestation).Include(q=>q.Regularisation) Include(q => q.Client.PostalAddress).Include(q => q.Prestation).Include(q=>q.Regularisation)
.SingleAsync(q => q.Id == id); .SingleAsync(q => q.Id == id);
if (query.PaymentId!=null) if (query.PaymentId!=null)
return new BadRequestObjectResult(new { error = "An existing payment process already exists" }); return new BadRequestObjectResult(new { error = "An existing payment process already exists" });
query.SelectedProfile = _context.BrusherProfile.Single(p => p.UserId == query.PerformerId); query.SelectedProfile = _context.BrusherProfile.Single(p => p.UserId == query.PerformerId);
var payment = Request.CreatePayment("HairCutCommand",apiContext, query, "sale", _logger); var payment = Request.CreatePayment("HairCutCommand",apiContext, query, "sale", _logger);
switch (payment.state) switch (payment.state)
{ {

View File

@ -38,7 +38,7 @@ namespace Yavsc.ApiControllers
p=>p.PaypalPaymentId==paymentId) p=>p.PaypalPaymentId==paymentId)
}; };
await Task.Run( () => { await Task.Run( () => {
var apiContext = paymentSettings.CreateAPIContext(); var apiContext = PayPalHelpers.CreateAPIContext();
result.FromPaypal = Payment.Get(apiContext,paymentId); result.FromPaypal = Payment.Get(apiContext,paymentId);
}); });
@ -50,7 +50,7 @@ namespace Yavsc.ApiControllers
{ {
Payment result=null; Payment result=null;
await Task.Run( () => { await Task.Run( () => {
var apiContext = paymentSettings.CreateAPIContext(); var apiContext = PayPalHelpers.CreateAPIContext();
var payment = Payment.Get(apiContext,paymentId); var payment = Payment.Get(apiContext,paymentId);
var execution = new PaymentExecution(); var execution = new PaymentExecution();
execution.payer_id = payerId; execution.payer_id = payerId;
@ -64,7 +64,7 @@ namespace Yavsc.ApiControllers
[HttpPost("create"),AllowAnonymous] [HttpPost("create"),AllowAnonymous]
public IActionResult Create() public IActionResult Create()
{ {
var apiContext = paymentSettings.CreateAPIContext(); var apiContext = PayPalHelpers.CreateAPIContext();
Payment result= Request.CreatePayment("Command",apiContext,new Estimate()); Payment result= Request.CreatePayment("Command",apiContext,new Estimate());
return Ok(Payment.Create(apiContext,result)); return Ok(Payment.Create(apiContext,result));
} }

View File

@ -250,5 +250,9 @@ namespace Yavsc.Controllers
_context.SaveChanges(User.GetUserId()); _context.SaveChanges(User.GetUserId());
return RedirectToAction("Index"); return RedirectToAction("Index");
} }
public IActionResult CGV()
{
return View();
}
} }
} }

View File

@ -44,6 +44,7 @@ namespace Yavsc.Controllers
} }
PayPalSettings payPalSettings; PayPalSettings payPalSettings;
private async Task<HairCutQuery> GetQuery(long id) private async Task<HairCutQuery> GetQuery(long id)
{ {
return await _context.HairCutQueries return await _context.HairCutQueries
@ -130,7 +131,7 @@ namespace Yavsc.Controllers
{ {
return HttpNotFound(); return HttpNotFound();
} }
var context = payPalSettings.CreateAPIContext(); var context = PayPalHelpers.CreateAPIContext();
var payment = Payment.Get(context,paymentId); var payment = Payment.Get(context,paymentId);
var execution = new PaymentExecution{ transactions = payment.transactions, var execution = new PaymentExecution{ transactions = payment.transactions,
@ -180,6 +181,9 @@ namespace Yavsc.Controllers
// ModelState.ClearValidationState("Client.Avatar"); // ModelState.ClearValidationState("Client.Avatar");
// ModelState.ClearValidationState("ClientId"); // ModelState.ClearValidationState("ClientId");
if (!model.Consent)
ModelState.AddModelError("Consent", "Vous devez accepter les conditions générales de vente de ce service");
if (ModelState.IsValid) if (ModelState.IsValid)
{ {
if (model.Location!=null) { if (model.Location!=null) {
@ -303,7 +307,6 @@ namespace Yavsc.Controllers
[ValidateAntiForgeryToken] [ValidateAntiForgeryToken]
public async Task<IActionResult> CreateHairMultiCutQuery(HairMultiCutQuery command) public async Task<IActionResult> CreateHairMultiCutQuery(HairMultiCutQuery command)
{ {
var uid = User.GetUserId(); var uid = User.GetUserId();
var prid = command.PerformerId; var prid = command.PerformerId;
if (string.IsNullOrWhiteSpace(uid) if (string.IsNullOrWhiteSpace(uid)

View File

@ -719,7 +719,7 @@ namespace Yavsc.Controllers
public IActionResult PaymentInfo(string id) public IActionResult PaymentInfo(string id)
{ {
var context = _payPalSettings.CreateAPIContext(); var context = PayPalHelpers.CreateAPIContext();
var payment = Payment.Get(context,id); var payment = Payment.Get(context,id);
return View (payment); return View (payment);
} }

View File

@ -10,25 +10,45 @@ namespace Yavsc.Helpers
{ {
public static class PayPalHelpers public static class PayPalHelpers
{ {
public static APIContext CreateAPIContext(this PayPalSettings settings) private static OAuthTokenCredential payPaylCredential=null;
public static OAuthTokenCredential PayPaylCredential
{ {
Dictionary<string,string> config = new Dictionary<string,string>(); get
config.Add("mode",settings.Mode); {
config.Add("clientId",settings.ClientId); if (payPaylCredential==null)
config.Add("clientSecret",settings.Secret); {
var accessToken = new OAuthTokenCredential(config).GetAccessToken(); Dictionary<string,string> config = new Dictionary<string,string>();
config.Add("mode",Startup.PayPalSettings.Mode);
config.Add("clientId",Startup.PayPalSettings.ClientId);
config.Add("clientSecret",Startup.PayPalSettings.Secret);
config.Add("user",Startup.PayPalSettings.APIUserId);
config.Add("SIGNATURE",Startup.PayPalSettings.APISignature);
config.Add("PWD",Startup.PayPalSettings.APIPassword);
payPaylCredential = new OAuthTokenCredential(config);
}
return payPaylCredential;
}
}
public static APIContext CreateAPIContext()
{
var accessToken = PayPaylCredential.GetAccessToken();
var apiContext = new APIContext(accessToken); var apiContext = new APIContext(accessToken);
return apiContext; return apiContext;
} }
public class PaymentUrls { public class PaymentUrls {
public string Details { get; set; } public string Details { get; set; }
public string Cancel { get; set; } public string Cancel { get; set; }
public string CGV { get; set; }
} }
public static PaymentUrls GetPaymentUrls(this HttpRequest request, string controllerName, string id ) public static PaymentUrls GetPaymentUrls(this HttpRequest request, string controllerName, string id )
{ {
var result =new PaymentUrls { var result =new PaymentUrls {
Details = request.ToAbsolute($"{controllerName}/Details/{id}") , Details = request.ToAbsolute($"{controllerName}/Details/{id}") ,
Cancel = request.ToAbsolute($"{controllerName}/ClientCancel/{id}") Cancel = request.ToAbsolute($"{controllerName}/ClientCancel/{id}"),
CGV = request.ToAbsolute($"{controllerName}/CGV")
}; };
return result; return result;
} }

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,707 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations
{
public partial class paymentConsent : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", table: "CircleAuthorizationToBlogPost");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
migrationBuilder.DropForeignKey(name: "FK_BrusherProfile_PerformerProfile_UserId", table: "BrusherProfile");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", table: "HairPrestationCollectionItem");
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", table: "HairPrestationCollectionItem");
migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint");
migrationBuilder.DropForeignKey(name: "FK_HairTaintInstance_HairPrestation_PrestationId", table: "HairTaintInstance");
migrationBuilder.DropForeignKey(name: "FK_HairTaintInstance_HairTaint_TaintId", table: "HairTaintInstance");
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_Notification_NotificationId", table: "DimissClicked");
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked");
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
migrationBuilder.DropForeignKey(name: "FK_PaypalPayment_ApplicationUser_ExecutorId", table: "PaypalPayment");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.AddColumn<bool>(
name: "Consent",
table: "RdvQuery",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "Consent",
table: "HairMultiCutQuery",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<bool>(
name: "Consent",
table: "HairCutQuery",
nullable: false,
defaultValue: false);
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
table: "AspNetUserRoles",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BlackListed_ApplicationUser_OwnerId",
table: "BlackListed",
column: "OwnerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
table: "CircleAuthorizationToBlogPost",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_AccountBalance_ApplicationUser_UserId",
table: "AccountBalance",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact",
column: "BalanceId",
principalTable: "AccountBalance",
principalColumn: "UserId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine",
column: "EstimateId",
principalTable: "Estimate",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_ApplicationUser_ClientId",
table: "Estimate",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Connection_ApplicationUser_ApplicationUserId",
table: "Connection",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_BrusherProfile_PerformerProfile_UserId",
table: "BrusherProfile",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_Activity_ActivityCode",
table: "HairCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_ApplicationUser_ClientId",
table: "HairCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
table: "HairCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_HairPrestation_PrestationId",
table: "HairCutQuery",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
table: "HairMultiCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
table: "HairMultiCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
table: "HairMultiCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId",
table: "HairPrestationCollectionItem",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId",
table: "HairPrestationCollectionItem",
column: "QueryId",
principalTable: "HairMultiCutQuery",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairTaintInstance_HairPrestation_PrestationId",
table: "HairTaintInstance",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_HairTaintInstance_HairTaint_TaintId",
table: "HairTaintInstance",
column: "TaintId",
principalTable: "HairTaint",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_DimissClicked_Notification_NotificationId",
table: "DimissClicked",
column: "NotificationId",
principalTable: "Notification",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_DimissClicked_ApplicationUser_UserId",
table: "DimissClicked",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_Instrumentation_Instrument_InstrumentId",
table: "Instrumentation",
column: "InstrumentId",
principalTable: "Instrument",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PaypalPayment_ApplicationUser_ExecutorId",
table: "PaypalPayment",
column: "ExecutorId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_Circle_CircleId",
table: "CircleMember",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_ApplicationUser_MemberId",
table: "CircleMember",
column: "MemberId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_CommandForm_Activity_ActivityCode",
table: "CommandForm",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_Activity_ActivityCode",
table: "RdvQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_ApplicationUser_ClientId",
table: "RdvQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_PerformerProfile_PerformerId",
table: "RdvQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Cascade);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Cascade);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId", table: "AspNetRoleClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId", table: "AspNetUserClaims");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId", table: "AspNetUserLogins");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_IdentityRole_RoleId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_IdentityUserRole<string>_ApplicationUser_UserId", table: "AspNetUserRoles");
migrationBuilder.DropForeignKey(name: "FK_BlackListed_ApplicationUser_OwnerId", table: "BlackListed");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId", table: "CircleAuthorizationToBlogPost");
migrationBuilder.DropForeignKey(name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId", table: "CircleAuthorizationToBlogPost");
migrationBuilder.DropForeignKey(name: "FK_AccountBalance_ApplicationUser_UserId", table: "AccountBalance");
migrationBuilder.DropForeignKey(name: "FK_BalanceImpact_AccountBalance_BalanceId", table: "BalanceImpact");
migrationBuilder.DropForeignKey(name: "FK_CommandLine_Estimate_EstimateId", table: "CommandLine");
migrationBuilder.DropForeignKey(name: "FK_Estimate_ApplicationUser_ClientId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Estimate_PerformerProfile_OwnerId", table: "Estimate");
migrationBuilder.DropForeignKey(name: "FK_Connection_ApplicationUser_ApplicationUserId", table: "Connection");
migrationBuilder.DropForeignKey(name: "FK_BrusherProfile_PerformerProfile_UserId", table: "BrusherProfile");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_Activity_ActivityCode", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_ApplicationUser_ClientId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_PerformerProfile_PerformerId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairCutQuery_HairPrestation_PrestationId", table: "HairCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_Activity_ActivityCode", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_ApplicationUser_ClientId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId", table: "HairMultiCutQuery");
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId", table: "HairPrestationCollectionItem");
migrationBuilder.DropForeignKey(name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId", table: "HairPrestationCollectionItem");
migrationBuilder.DropForeignKey(name: "FK_HairTaint_Color_ColorId", table: "HairTaint");
migrationBuilder.DropForeignKey(name: "FK_HairTaintInstance_HairPrestation_PrestationId", table: "HairTaintInstance");
migrationBuilder.DropForeignKey(name: "FK_HairTaintInstance_HairTaint_TaintId", table: "HairTaintInstance");
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_Notification_NotificationId", table: "DimissClicked");
migrationBuilder.DropForeignKey(name: "FK_DimissClicked_ApplicationUser_UserId", table: "DimissClicked");
migrationBuilder.DropForeignKey(name: "FK_Instrumentation_Instrument_InstrumentId", table: "Instrumentation");
migrationBuilder.DropForeignKey(name: "FK_PaypalPayment_ApplicationUser_ExecutorId", table: "PaypalPayment");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_Circle_CircleId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_CircleMember_ApplicationUser_MemberId", table: "CircleMember");
migrationBuilder.DropForeignKey(name: "FK_PostTag_Blog_PostId", table: "PostTag");
migrationBuilder.DropForeignKey(name: "FK_CommandForm_Activity_ActivityCode", table: "CommandForm");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_Location_OrganizationAddressId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_PerformerProfile_ApplicationUser_PerformerId", table: "PerformerProfile");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_Activity_ActivityCode", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_ApplicationUser_ClientId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_RdvQuery_PerformerProfile_PerformerId", table: "RdvQuery");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_Activity_DoesCode", table: "UserActivity");
migrationBuilder.DropForeignKey(name: "FK_UserActivity_PerformerProfile_UserId", table: "UserActivity");
migrationBuilder.DropColumn(name: "Consent", table: "RdvQuery");
migrationBuilder.DropColumn(name: "Consent", table: "HairMultiCutQuery");
migrationBuilder.DropColumn(name: "Consent", table: "HairCutQuery");
migrationBuilder.AddForeignKey(
name: "FK_IdentityRoleClaim<string>_IdentityRole_RoleId",
table: "AspNetRoleClaims",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserClaim<string>_ApplicationUser_UserId",
table: "AspNetUserClaims",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserLogin<string>_ApplicationUser_UserId",
table: "AspNetUserLogins",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_IdentityRole_RoleId",
table: "AspNetUserRoles",
column: "RoleId",
principalTable: "AspNetRoles",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_IdentityUserRole<string>_ApplicationUser_UserId",
table: "AspNetUserRoles",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BlackListed_ApplicationUser_OwnerId",
table: "BlackListed",
column: "OwnerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleAuthorizationToBlogPost_Blog_BlogPostId",
table: "CircleAuthorizationToBlogPost",
column: "BlogPostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleAuthorizationToBlogPost_Circle_CircleId",
table: "CircleAuthorizationToBlogPost",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_AccountBalance_ApplicationUser_UserId",
table: "AccountBalance",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BalanceImpact_AccountBalance_BalanceId",
table: "BalanceImpact",
column: "BalanceId",
principalTable: "AccountBalance",
principalColumn: "UserId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CommandLine_Estimate_EstimateId",
table: "CommandLine",
column: "EstimateId",
principalTable: "Estimate",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_ApplicationUser_ClientId",
table: "Estimate",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Estimate_PerformerProfile_OwnerId",
table: "Estimate",
column: "OwnerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Connection_ApplicationUser_ApplicationUserId",
table: "Connection",
column: "ApplicationUserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_BrusherProfile_PerformerProfile_UserId",
table: "BrusherProfile",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_Activity_ActivityCode",
table: "HairCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_ApplicationUser_ClientId",
table: "HairCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_PerformerProfile_PerformerId",
table: "HairCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairCutQuery_HairPrestation_PrestationId",
table: "HairCutQuery",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_Activity_ActivityCode",
table: "HairMultiCutQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_ApplicationUser_ClientId",
table: "HairMultiCutQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairMultiCutQuery_PerformerProfile_PerformerId",
table: "HairMultiCutQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairPrestationCollectionItem_HairPrestation_PrestationId",
table: "HairPrestationCollectionItem",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairPrestationCollectionItem_HairMultiCutQuery_QueryId",
table: "HairPrestationCollectionItem",
column: "QueryId",
principalTable: "HairMultiCutQuery",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairTaint_Color_ColorId",
table: "HairTaint",
column: "ColorId",
principalTable: "Color",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairTaintInstance_HairPrestation_PrestationId",
table: "HairTaintInstance",
column: "PrestationId",
principalTable: "HairPrestation",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_HairTaintInstance_HairTaint_TaintId",
table: "HairTaintInstance",
column: "TaintId",
principalTable: "HairTaint",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_DimissClicked_Notification_NotificationId",
table: "DimissClicked",
column: "NotificationId",
principalTable: "Notification",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_DimissClicked_ApplicationUser_UserId",
table: "DimissClicked",
column: "UserId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_Instrumentation_Instrument_InstrumentId",
table: "Instrumentation",
column: "InstrumentId",
principalTable: "Instrument",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PaypalPayment_ApplicationUser_ExecutorId",
table: "PaypalPayment",
column: "ExecutorId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_Circle_CircleId",
table: "CircleMember",
column: "CircleId",
principalTable: "Circle",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CircleMember_ApplicationUser_MemberId",
table: "CircleMember",
column: "MemberId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PostTag_Blog_PostId",
table: "PostTag",
column: "PostId",
principalTable: "Blog",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_CommandForm_Activity_ActivityCode",
table: "CommandForm",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_Location_OrganizationAddressId",
table: "PerformerProfile",
column: "OrganizationAddressId",
principalTable: "Location",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_PerformerProfile_ApplicationUser_PerformerId",
table: "PerformerProfile",
column: "PerformerId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_Activity_ActivityCode",
table: "RdvQuery",
column: "ActivityCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_ApplicationUser_ClientId",
table: "RdvQuery",
column: "ClientId",
principalTable: "AspNetUsers",
principalColumn: "Id",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_RdvQuery_PerformerProfile_PerformerId",
table: "RdvQuery",
column: "PerformerId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_Activity_DoesCode",
table: "UserActivity",
column: "DoesCode",
principalTable: "Activity",
principalColumn: "Code",
onDelete: ReferentialAction.Restrict);
migrationBuilder.AddForeignKey(
name: "FK_UserActivity_PerformerProfile_UserId",
table: "UserActivity",
column: "UserId",
principalTable: "PerformerProfile",
principalColumn: "PerformerId",
onDelete: ReferentialAction.Restrict);
}
}
}

View File

@ -1,6 +1,8 @@
using System; using System;
using Microsoft.Data.Entity; using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure; using Microsoft.Data.Entity.Infrastructure;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Migrations;
using Yavsc.Models; using Yavsc.Models;
namespace Yavsc.Migrations namespace Yavsc.Migrations
@ -539,6 +541,8 @@ namespace Yavsc.Migrations
b.Property<string>("ClientId") b.Property<string>("ClientId")
.IsRequired(); .IsRequired();
b.Property<bool>("Consent");
b.Property<DateTime>("DateCreated"); b.Property<DateTime>("DateCreated");
b.Property<DateTime>("DateModified"); b.Property<DateTime>("DateModified");
@ -582,6 +586,8 @@ namespace Yavsc.Migrations
b.Property<string>("ClientId") b.Property<string>("ClientId")
.IsRequired(); .IsRequired();
b.Property<bool>("Consent");
b.Property<DateTime>("DateCreated"); b.Property<DateTime>("DateCreated");
b.Property<DateTime>("DateModified"); b.Property<DateTime>("DateModified");
@ -1097,6 +1103,8 @@ namespace Yavsc.Migrations
b.Property<string>("ClientId") b.Property<string>("ClientId")
.IsRequired(); .IsRequired();
b.Property<bool>("Consent");
b.Property<DateTime>("DateCreated"); b.Property<DateTime>("DateCreated");
b.Property<DateTime>("DateModified"); b.Property<DateTime>("DateModified");

View File

@ -15,6 +15,9 @@ namespace Yavsc.Models.Billing
{ {
public abstract long Id { get; set; } public abstract long Id { get; set; }
public abstract string Description { get; set; } public abstract string Description { get; set; }
[Required()]
public bool Consent { get; set; }
public DateTime DateCreated public DateTime DateCreated
{ {
get; set; get; set;

View File

@ -6,5 +6,9 @@ namespace Yavsc
public string Secret { get; set; } public string Secret { get; set; }
public string ClientId { get; set; } public string ClientId { get; set; }
// NV/SOAP Api - Signature
public string APIUserId { get; set; }
public string APIPassword { get; set; }
public string APISignature { get; set; }
} }
} }

View File

@ -35,10 +35,10 @@ namespace Yavsc
public static string UserBillsDirName { private set; get; } public static string UserBillsDirName { private set; get; }
public static string AvatarsDirName { private set; get; } public static string AvatarsDirName { private set; get; }
public static string Authority { get; private set; } public static string Authority { get; private set; }
public static string Audience { get; private set; }
public static string Temp { get; set; } public static string Temp { get; set; }
public static SiteSettings SiteSetup { get; private set; } public static SiteSettings SiteSetup { get; private set; }
public static PayPalSettings PayPalSettings { get; private set; }
private static ILogger logger; private static ILogger logger;
public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv) public Startup(IHostingEnvironment env, IApplicationEnvironment appEnv)
{ {
@ -239,15 +239,15 @@ namespace Yavsc
IOptions<OAuth2AppSettings> oauth2SettingsContainer, IOptions<OAuth2AppSettings> oauth2SettingsContainer,
RoleManager<IdentityRole> roleManager, RoleManager<IdentityRole> roleManager,
IAuthorizationService authorizationService, IAuthorizationService authorizationService,
IOptions<PayPalSettings> payPalSettings,
ILoggerFactory loggerFactory) ILoggerFactory loggerFactory)
{ {
SiteSetup = siteSettings.Value; SiteSetup = siteSettings.Value;
Authority = siteSettings.Value.Authority; Authority = siteSettings.Value.Authority;
Audience = siteSettings.Value.Audience;
Startup.UserFilesDirName = new DirectoryInfo(siteSettings.Value.UserFiles.Blog).FullName; Startup.UserFilesDirName = new DirectoryInfo(siteSettings.Value.UserFiles.Blog).FullName;
Startup.UserBillsDirName = new DirectoryInfo(siteSettings.Value.UserFiles.Bills).FullName; Startup.UserBillsDirName = new DirectoryInfo(siteSettings.Value.UserFiles.Bills).FullName;
Startup.Temp = siteSettings.Value.TempDir; Startup.Temp = siteSettings.Value.TempDir;
PayPalSettings = payPalSettings.Value;
// TODO implement an installation & upgrade procedure // TODO implement an installation & upgrade procedure
// Create required directories // Create required directories
foreach (string dir in new string[] { UserFilesDirName, UserBillsDirName, SiteSetup.TempDir }) foreach (string dir in new string[] { UserFilesDirName, UserBillsDirName, SiteSetup.TempDir })

View File

@ -0,0 +1,13 @@
@{
ViewData["Title"] = "Conditions Générales de Vente";
}
<h2>@ViewData["Title"]</h2>
<markdown>
Le paiement intervient à la commande, quelque soit la date d'intervention.
Vous pouvez annuler votre commande depuis la [liste de vos commande en cours](/HairCutCommand/),
Vous pouvez demander le remboursement d'un paiement, dans le cadre d'une réclamation sur l'execution
de votre commande, en nous contactant via courrier éléctronique ou postal, [que vour retrouverez sur la page de contact](/Home/Contact), votre demande sera rapidement traitée.
</markdown>

View File

@ -84,6 +84,7 @@
</environment> </environment>
<dt>@Html.DisplayNameFor(m=>m.Regularisation)</dt> <dt>@Html.DisplayNameFor(m=>m.Regularisation)</dt>
<dd>@Html.DisplayFor(m=>m.Regularisation,new { <dd>@Html.DisplayFor(m=>m.Regularisation,new {
PaymentUrl = "/api/haircut/createpayment/"+Model.Id.ToString(), PaymentUrl = "/api/haircut/createpayment/"+Model.Id.ToString(),

View File

@ -224,16 +224,24 @@
</textarea> </textarea>
</div> </div>
</div> </div>
<div class="form-group">
<span id="discount" class="price"></span> <span id="discount" class="price"></span>
<span><img src="~/images/dollars.svg" style="width:2em;" /> Total : <span id="Total" class="total"></span> <span><img src="~/images/dollars.svg" style="width:2em;" /> Total : <span id="Total" class="total"></span>
</span> </span><br/>
<label>
<input type="checkbox" asp-for="Consent" class="imptarif"></input> En cochant cette case, vous acceptez les
<a asp-action="CGV" class="btn btn-link">Conditions générales de vente</a> liées à cette commande de service.</label>
</div>
<input asp-for="ClientId" type="hidden" /> <input asp-for="ClientId" type="hidden" />
<input type="submit" class="btn btn-success btn-submit" value="@SR["Validez ce choix, et prendre rendez-vous"] avec @Model.PerformerProfile.Performer.UserName"/> <input type="submit" class="btn btn-success btn-submit" value="@SR["Validez ce choix, et prendre rendez-vous"] avec @Model.PerformerProfile.Performer.UserName"/>
<environment names="Development"> <environment names="Development">
<input type="submit" class="btn btn-success btn-submit" value="@SR["Validez ce choix, et prendre rendez-vous"] avec @Model.PerformerProfile.Performer.UserName [DEV+Location+Date]"/> <input type="submit" class="btn btn-success btn-submit" value="@SR["Validez ce choix, et prendre rendez-vous"] avec @Model.PerformerProfile.Performer.UserName [DEV+Location+Date]"/>
</environment> </environment>
</div> </div>
<input type="hidden" name="performerId" value="@Model.PerformerProfile.PerformerId" /> <input type="hidden" name="performerId" value="@Model.PerformerProfile.PerformerId" />
<input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" /> <input type="hidden" name="activityCode" value="@ViewBag.Activity.Code" />
</form> </form>

View File

@ -26,7 +26,7 @@
paypal.Button.render({ paypal.Button.render({
env: PAYPAL_ENV, // 'production', Optional: specify 'sandbox' environment env: PAYPAL_ENV, // 'production', Optional: specify 'sandbox' environment
commit: true,
payment: function(resolve, reject) { payment: function(resolve, reject) {
return paypal.request.post(CREATE_PAYMENT_URL) return paypal.request.post(CREATE_PAYMENT_URL)

View File

@ -17,7 +17,6 @@
"Slogan": "Yavsc!", "Slogan": "Yavsc!",
"Banner": "/images/banner.jpg", "Banner": "/images/banner.jpg",
"Authority": "http://127.0.0.1:5000/", "Authority": "http://127.0.0.1:5000/",
"Audience": "http://127.0.0.1:5000/",
"Owner": { "Owner": {
"Name": "[query]", "Name": "[query]",
"Address": "bigchief@company.com" "Address": "bigchief@company.com"

View File

@ -4,10 +4,14 @@ FSPATH=/srv/www/yavsc
( (
set -e set -e
ssh root@localhost service kestrel stop
ssh root@localhost rm -rf $FSPATH/approot/src ssh root@localhost rm -rf $FSPATH/approot/src
cd bin/output/ cd bin/output/
sleep 1
rsync -ravu wwwroot approot root@localhost:$FSPATH rsync -ravu wwwroot approot root@localhost:$FSPATH
sleep 1
ssh root@localhost sync ssh root@localhost sync
ssh root@localhost service kestrel restart sleep 1
ssh root@localhost service kestrel start
) )

View File

@ -10,5 +10,9 @@
"gulp-shell": "^0.5.2", "gulp-shell": "^0.5.2",
"gulp-uglify": "1.2.0", "gulp-uglify": "1.2.0",
"rimraf": "2.2.8" "rimraf": "2.2.8"
},
"dependencies": {
"braintree-web": "^3.15.0",
"paypal-permissions-sdk": "^1.0.8"
} }
} }

View File

@ -1,165 +1,168 @@
{ {
"version": "1.0.0-*", "version": "1.0.0-*",
"authors": [ "authors": [
"pazof" "pazof"
], ],
"tags": [ "tags": [
"" ""
], ],
"projectUrl": "http://yavsc.pschneider.fr", "projectUrl": "http://yavsc.pschneider.fr",
"licenseUrl": "", "licenseUrl": "",
"userSecretsId": "aspnet5-YavscWeb-a0dadd21-2ced-43d3-96f9-7e504345102f", "userSecretsId": "aspnet5-YavscWeb-a0dadd21-2ced-43d3-96f9-7e504345102f",
"compilationOptions": { "compilationOptions": {
"emitEntryPoint": true,
"debugType": "portable",
"outputName": "Yavsc"
},
"buildOptions": {
"debugType": "portable",
"emitEntryPoint": true
},
"compile": [
"*.cs"
],
"resource": [
"Resources/**/*.resx"
],
"namedResource": {},
"configurations": {
"Debug": {
"compilationOptions": {
"emitEntryPoint": true, "emitEntryPoint": true,
"define": [ "debugType": "portable",
"DEBUG", "outputName": "Yavsc"
"TRACE"
],
"optimize": false,
"debugType": "portable"
}
}, },
"Release": { "buildOptions": {
"compilationOptions": { "debugType": "portable",
"define": [ "emitEntryPoint": true
"RELEASE",
"TRACE"
],
"optimize": true
}
}
},
"webroot": "wwwroot",
"tooling": {
"defaultNamespace": "Yavsc"
},
"dependencies": {
"EntityFramework.Commands": "7.0.0-rc1-final",
"EntityFramework.Core": "7.0.0-rc1-final",
"EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
"EntityFramework.Relational": "7.0.0-rc1-final",
"EntityFramework7.Npgsql": "3.1.0-rc1-3",
"EntityFramework7.Npgsql.Design": "3.1.0-rc1-5",
"Google.Apis.Core": "1.11.1",
"Google.Apis": "1.11.1",
"MailKit": "1.12.0",
"MarkdownDeep-av.NET": "1.5.6",
"Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
"Microsoft.AspNet.Authentication.Facebook": "1.0.0-rc1-final",
"Microsoft.AspNet.Authentication.Twitter": "1.0.0-rc1-final",
"Microsoft.AspNet.Authorization": "1.0.0-rc1-final",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc1-final",
"Microsoft.AspNet.Http.Abstractions": "1.0.0-rc1-final",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-*",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-*",
"Microsoft.AspNet.Localization": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-*",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-*",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.Server.WebListener": "1.0.0-rc1-final",
"Microsoft.AspNet.SignalR.Core": "2.2.1",
"Microsoft.AspNet.SignalR.JS": "2.2.1",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-*",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-*",
"Microsoft.AspNet.WebSockets.Server": "1.0.0-rc1-*",
"Microsoft.Extensions.Configuration.Abstractions": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.TraceSource": "1.0.0-rc1-final",
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final",
"Microsoft.Extensions.Globalization.CultureInfoCache": "1.0.0-rc1-final",
"Microsoft.Extensions.Localization": "1.0.0-rc1-final",
"Microsoft.Extensions.Localization.Abstractions": "1.0.0-rc1-final",
"Microsoft.Extensions.CodeGeneration": "1.0.0-rc1-final",
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final",
"Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
"Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta8",
"Microsoft.Framework.Configuration.Binder": "1.0.0-beta8",
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
"Microsoft.AspNet.Session": "1.0.0-rc1-final",
"Microsoft.AspNet.Web.Optimization": "1.1.3",
"Microsoft.Extensions.WebEncoders.Core": "1.0.0-rc1-final",
"Microsoft.Extensions.Options": "0.0.1-alpha",
"Microsoft.Extensions.WebEncoders": "1.0.0-rc1-final",
"Microsoft.AspNet.DataProtection": "1.0.0-rc1-final",
"Microsoft.AspNet.DataProtection.SystemWeb": "1.0.0-rc1-final",
"Microsoft.AspNet.Authentication.JwtBearer": "1.0.0-rc1-final",
"PayPalCoreSDK": "1.7.1",
"Microsoft.AspNet.Authentication.OAuth": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc.Formatters.Json": "6.0.0-rc1-final",
"Microsoft.AspNet.OWin": "1.0.0-rc1-final",
"System.Json": "4.0.20126.16343",
"YavscLib": {
"type": "build",
"version": "1.0.0"
}, },
"Extensions.AspNet.Authentication.Instagram": "1.0.0-t150809211713", "compile": [
"Microsoft.AspNet.Http.Extensions": "1.0.0-rc1-final", "*.cs"
"Microsoft.DiaSymReader.Native": "1.5.0", ],
"PayPal": "1.8.0" "resource": [
}, "Resources/**/*.resx"
"commands": { ],
"web": "Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000", "namedResource": {},
"coiffure": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:88", "configurations": {
"lua": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:85", "Debug": {
"luatest": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5001", "compilationOptions": {
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000", "emitEntryPoint": true,
"zicmoove": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:87", "define": [
"yavsc": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:86", "DEBUG",
"yavscpre": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:84", "TRACE"
"ef": "EntityFramework.Commands", ],
"gen": "Microsoft.Extensions.CodeGeneration" "optimize": false,
}, "debugType": "portable"
"frameworks": { }
"dnx451": { },
"frameworkAssemblies": { "Release": {
"System.Drawing": "4.0.0.0" "compilationOptions": {
} "define": [
} "RELEASE",
}, "TRACE"
"exclude": [ ],
"wwwroot", "optimize": true
"node_modules", }
"bower_components", }
"contrib" },
], "webroot": "wwwroot",
"publishExclude": [ "tooling": {
"**.user", "defaultNamespace": "Yavsc"
"**.vspscc", },
"contrib/**/*.*" "dependencies": {
], "EntityFramework.Commands": "7.0.0-rc1-final",
"scripts": { "EntityFramework.Core": "7.0.0-rc1-final",
"prebuild": "echo before building", "EntityFramework.MicrosoftSqlServer": "7.0.0-rc1-final",
"postbuild": "echo after building", "EntityFramework.Relational": "7.0.0-rc1-final",
"prepack": "gulp min", "EntityFramework7.Npgsql": "3.1.0-rc1-3",
"postpack": "echo after packing", "EntityFramework7.Npgsql.Design": "3.1.0-rc1-5",
"prerestore": "echo before restoring packages", "Google.Apis.Core": "1.11.1",
"postrestore": "echo after restoring packages", "Google.Apis": "1.11.1",
"prepublish": "gulp min", "MailKit": "1.12.0",
"postpublish": "echo \"Use contrib/rsync-to-pre.sh # to push in prod.\"" "MarkdownDeep-av.NET": "1.5.6",
}, "Microsoft.AspNet.Authentication.Cookies": "1.0.0-rc1-final",
"embed": "Views/**/*.cshtml" "Microsoft.AspNet.Authentication.Facebook": "1.0.0-rc1-final",
"Microsoft.AspNet.Authentication.Twitter": "1.0.0-rc1-final",
"Microsoft.AspNet.Authorization": "1.0.0-rc1-final",
"Microsoft.AspNet.Diagnostics.Entity": "7.0.0-rc1-final",
"Microsoft.AspNet.Http.Abstractions": "1.0.0-rc1-final",
"Microsoft.AspNet.Identity.EntityFramework": "3.0.0-rc1-*",
"Microsoft.AspNet.IISPlatformHandler": "1.0.0-rc1-*",
"Microsoft.AspNet.Localization": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc": "6.0.0-rc1-*",
"Microsoft.AspNet.Mvc.TagHelpers": "6.0.0-rc1-*",
"Microsoft.AspNet.Server.Kestrel": "1.0.0-rc1-final",
"Microsoft.AspNet.Server.WebListener": "1.0.0-rc1-final",
"Microsoft.AspNet.SignalR.Core": "2.2.1",
"Microsoft.AspNet.SignalR.JS": "2.2.1",
"Microsoft.AspNet.StaticFiles": "1.0.0-rc1-*",
"Microsoft.AspNet.Tooling.Razor": "1.0.0-rc1-*",
"Microsoft.AspNet.WebSockets.Server": "1.0.0-rc1-*",
"Microsoft.Extensions.Configuration.Abstractions": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.FileProviderExtensions": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.Json": "1.0.0-rc1-final",
"Microsoft.Extensions.Configuration.UserSecrets": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Console": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.Debug": "1.0.0-rc1-final",
"Microsoft.Extensions.Logging.TraceSource": "1.0.0-rc1-final",
"Microsoft.Extensions.DependencyInjection.Abstractions": "1.0.0-rc1-final",
"Microsoft.Extensions.Globalization.CultureInfoCache": "1.0.0-rc1-final",
"Microsoft.Extensions.Localization": "1.0.0-rc1-final",
"Microsoft.Extensions.Localization.Abstractions": "1.0.0-rc1-final",
"Microsoft.Extensions.CodeGeneration": "1.0.0-rc1-final",
"Microsoft.Extensions.PlatformAbstractions": "1.0.0-rc1-final",
"Microsoft.Extensions.CodeGenerators.Mvc": "1.0.0-rc1-final",
"Microsoft.Framework.ConfigurationModel.Json": "1.0.0-beta4",
"Microsoft.Framework.Configuration.Abstractions": "1.0.0-beta8",
"Microsoft.Framework.Configuration.Binder": "1.0.0-beta8",
"Microsoft.Framework.Configuration.Json": "1.0.0-beta8",
"Microsoft.AspNet.Session": "1.0.0-rc1-final",
"Microsoft.AspNet.Web.Optimization": "1.1.3",
"Microsoft.Extensions.WebEncoders.Core": "1.0.0-rc1-final",
"Microsoft.Extensions.Options": "0.0.1-alpha",
"Microsoft.Extensions.WebEncoders": "1.0.0-rc1-final",
"Microsoft.AspNet.DataProtection": "1.0.0-rc1-final",
"Microsoft.AspNet.DataProtection.SystemWeb": "1.0.0-rc1-final",
"Microsoft.AspNet.Authentication.JwtBearer": "1.0.0-rc1-final",
"PayPalCoreSDK": "1.7.1",
"Microsoft.AspNet.Authentication.OAuth": "1.0.0-rc1-final",
"Microsoft.AspNet.Mvc.Formatters.Json": "6.0.0-rc1-final",
"Microsoft.AspNet.OWin": "1.0.0-rc1-final",
"System.Json": "4.0.20126.16343",
"YavscLib": {
"type": "build",
"version": "1.0.0"
},
"Extensions.AspNet.Authentication.Instagram": "1.0.0-t150809211713",
"Microsoft.AspNet.Http.Extensions": "1.0.0-rc1-final",
"Microsoft.DiaSymReader.Native": "1.5.0",
"PayPal": "1.8.0"
},
"commands": {
"web": "Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000",
"coiffure": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:88",
"lua": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:85",
"luatest": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5001",
"kestrel": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:5000",
"zicmoove": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:87",
"yavsc": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:86",
"yavscpre": "Microsoft.AspNet.Hosting --server Microsoft.AspNet.Server.Kestrel --server.urls http://*:84",
"ef": "EntityFramework.Commands",
"gen": "Microsoft.Extensions.CodeGeneration"
},
"frameworks": {
"dnx451": {
"frameworkAssemblies": {
"System.Drawing": "4.0.0.0",
"System.Net": "4.0.0.0",
"System.Xml": "4.0.0.0",
"System": "4.0.0.0"
}
}
},
"exclude": [
"wwwroot",
"node_modules",
"bower_components",
"contrib"
],
"publishExclude": [
"**.user",
"**.vspscc",
"contrib/**/*.*"
],
"scripts": {
"prebuild": "echo before building",
"postbuild": "echo after building",
"prepack": "gulp min",
"postpack": "echo after packing",
"prerestore": "echo before restoring packages",
"postrestore": "echo after restoring packages",
"prepublish": "gulp min",
"postpublish": "echo \"Use contrib/rsync-to-pre.sh # to push in prod.\""
},
"embed": "Views/**/*.cshtml"
} }

View File

@ -11635,7 +11635,10 @@
"PayPal >= 1.8.0" "PayPal >= 1.8.0"
], ],
"DNX,Version=v4.5.1": [ "DNX,Version=v4.5.1": [
"fx/System.Drawing >= 4.0.0" "fx/System.Drawing >= 4.0.0",
"fx/System.Net >= 4.0.0",
"fx/System.Xml >= 4.0.0",
"fx/System >= 4.0.0"
] ]
} }
} }