diff --git a/Nixtus.Plugin.Payments.Nmi/Components/NmiViewComponent.cs b/Nixtus.Plugin.Payments.Nmi/Components/NmiViewComponent.cs index 79f0acc..4be6145 100644 --- a/Nixtus.Plugin.Payments.Nmi/Components/NmiViewComponent.cs +++ b/Nixtus.Plugin.Payments.Nmi/Components/NmiViewComponent.cs @@ -1,5 +1,4 @@ -using System.Net; -using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc; using Nixtus.Plugin.Payments.Nmi.Models; using Nop.Web.Framework.Components; @@ -12,14 +11,6 @@ public IViewComponentResult Invoke() { var model = new PaymentInfoModel(); - //set postback values (we cannot access "Form" with "GET" requests) - if (Request.Method == WebRequestMethods.Http.Get) - return View("~/Plugins/Payments.Nmi/Views/PaymentInfo.cshtml", model); - - var form = Request.Form; - model.CardNumber = form["CardNumber"]; - model.CardCode = form["CardCode"]; - return View("~/Plugins/Payments.Nmi/Views/PaymentInfo.cshtml", model); } } diff --git a/Nixtus.Plugin.Payments.Nmi/Views/PaymentInfo.cshtml b/Nixtus.Plugin.Payments.Nmi/Views/PaymentInfo.cshtml index f95a647..0a31c19 100644 --- a/Nixtus.Plugin.Payments.Nmi/Views/PaymentInfo.cshtml +++ b/Nixtus.Plugin.Payments.Nmi/Views/PaymentInfo.cshtml @@ -8,6 +8,11 @@ @using Nixtus.Plugin.Payments.Nmi @model Nixtus.Plugin.Payments.Nmi.Models.PaymentInfoModel +
+ | + |
@Html.LabelFor(model => model.ExpireMonth, false): | |
+ | + |
@Html.LabelFor(model => model.CardCode, false): | |
+ | + |