From 6bc6bd23a33f04793fd25a14c2525af91f7149f2 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 26 May 2017 03:35:56 +0200 Subject: [PATCH] payment info --- Yavsc/Views/Manage/PaymentError.cshtml | 14 ++++----- Yavsc/Views/Manage/PaymentInfo.cshtml | 31 +++++++++++++++++++ .../Components/PayPalButton/Default.cshtml | 4 +-- ...sCheckoutDetailsResponseDetailsType.cshtml | 24 ++++++++++++++ Yavsc/Views/_ViewImports.cshtml | 1 + 5 files changed, 65 insertions(+), 9 deletions(-) create mode 100644 Yavsc/Views/Manage/PaymentInfo.cshtml create mode 100644 Yavsc/Views/Shared/DisplayTemplates/GetExpressCheckoutDetailsResponseDetailsType.cshtml diff --git a/Yavsc/Views/Manage/PaymentError.cshtml b/Yavsc/Views/Manage/PaymentError.cshtml index 28881ce7..94499173 100644 --- a/Yavsc/Views/Manage/PaymentError.cshtml +++ b/Yavsc/Views/Manage/PaymentError.cshtml @@ -1,8 +1,8 @@ +@{ + ViewData["Title"] = "Le paiment "+ViewData["id"]+" a échoué"; +} - -
-
Le paiment @ViewData["id"] a échoué -
-
@ViewData["error"] -
-
\ No newline at end of file +

@ViewData["Title"].

+

+@ViewData["error"] +

\ No newline at end of file diff --git a/Yavsc/Views/Manage/PaymentInfo.cshtml b/Yavsc/Views/Manage/PaymentInfo.cshtml new file mode 100644 index 00000000..1d19d849 --- /dev/null +++ b/Yavsc/Views/Manage/PaymentInfo.cshtml @@ -0,0 +1,31 @@ +@model Yavsc.ViewModels.PayPal.PaymentInfo +@{ + ViewData["Title"] = "Informations sur le paiment "+ViewData["id"]; +} + +

@ViewData["Title"].

+

+ @if (Model.DbContent.Executor.Id == User.GetUserId()) { + + Votre paiment + + } else { + + Le paiment de @Html.DisplayFor(m=>m.DbContent.Executor.UserName) + + } + : +

+
+ + [@Model.DbContent.CreationToken]
+ + @Html.DisplayFor(m=>m.DetailsFromPayPal) +
+
+
+
+ + + +

diff --git a/Yavsc/Views/Shared/Components/PayPalButton/Default.cshtml b/Yavsc/Views/Shared/Components/PayPalButton/Default.cshtml index 9848413d..92f490fb 100644 --- a/Yavsc/Views/Shared/Components/PayPalButton/Default.cshtml +++ b/Yavsc/Views/Shared/Components/PayPalButton/Default.cshtml @@ -1,6 +1,6 @@ @model NominativeServiceCommand @inject IOptions PayPalSettings -@Model.PaymentId + @if (Model!=null && Model.PaymentId!=null) { @if (Model.Regularisation.Executor.Id == User.GetUserId()) { @@ -13,7 +13,7 @@ } : - @Model.Regularisation.PaypalPaymentId + @Model.Regularisation.CreationToken } else {
diff --git a/Yavsc/Views/Shared/DisplayTemplates/GetExpressCheckoutDetailsResponseDetailsType.cshtml b/Yavsc/Views/Shared/DisplayTemplates/GetExpressCheckoutDetailsResponseDetailsType.cshtml new file mode 100644 index 00000000..000ec8ec --- /dev/null +++ b/Yavsc/Views/Shared/DisplayTemplates/GetExpressCheckoutDetailsResponseDetailsType.cshtml @@ -0,0 +1,24 @@ +@model GetExpressCheckoutDetailsResponseDetailsType + +@Html.DisplayFor(m=>m.PayerInfo) +@Html.DisplayFor(m=>m.InvoiceID) +@Html.DisplayFor(m=>m.BillingAgreementAcceptedStatus) +@Html.DisplayFor(m=>m.BillingAddress) + +@Html.DisplayFor(m=>m.ContactPhone) +@Html.DisplayFor(m=>m.Note) +@Html.DisplayFor(m=>m.CheckoutStatus) +@Html.DisplayFor(m=>m.PayPalAdjustment) +@Html.DisplayFor(m=>m.PaymentDetails) +@Html.DisplayFor(m=>m.UserSelectedOptions) +@Html.DisplayFor(m=>m.IncentiveDetails) +@if (Model.GiftReceiptEnable) + @Html.DispayFor(m=>m.GiftMessage) + + @Html.DispayFor(m=>m.GiftWrapName) + @Html.DispayFor(m=>m.GiftWrapAmount) + @Html.DispayFor(m=>m.BuyerMarketingEmail) + @Html.DispayFor(m=>m.SurveyQuestion) + @Html.DispayFor(m=>m.SurveyChoiceSelected) + @Html.DispayFor(m=>m.CartChangeTolerance) + @Html.DispayFor(m=>m.InstrumentDetails) diff --git a/Yavsc/Views/_ViewImports.cshtml b/Yavsc/Views/_ViewImports.cshtml index a7c259df..f2b44b15 100755 --- a/Yavsc/Views/_ViewImports.cshtml +++ b/Yavsc/Views/_ViewImports.cshtml @@ -34,6 +34,7 @@ @using Yavsc.ViewModels.Blogspot; @using Microsoft.AspNet.Hosting; @using Microsoft.Extensions.PlatformAbstractions; +@using PayPal.PayPalAPIInterfaceService.Model; @inject IViewLocalizer LocString @addTagHelper "*, Microsoft.AspNet.Mvc.TagHelpers"