Open-source eCommerce platform for C# and ASP.NET Core 10 with MongoDB. Build multi-store shops and multi-vendor marketplaces with B2B/B2C, REST API, plugins, Vue 3 and Docker.
C# aspnet-corecsharpdockerdotnetecommerceecommerce-platformmongodbmulti-storemulti-vendornosqlonline-shopshoppingcart
Plugin Payments.BrainTree - change type of project to Microsoft.NET.Sdk.Razor
KrzysztofPajakb2d9576859d5
diff --git a/src/Plugins/Payments.BrainTree/Controllers/PaymentBrainTreeController.cs b/src/Plugins/Payments.BrainTree/Areas/Admin/Controllers/PaymentBrainTreeController.cssimilarity index 97%rename from src/Plugins/Payments.BrainTree/Controllers/PaymentBrainTreeController.csrename to src/Plugins/Payments.BrainTree/Areas/Admin/Controllers/PaymentBrainTreeController.csindex 616cfb91f..a632418fd 100644--- a/src/Plugins/Payments.BrainTree/Controllers/PaymentBrainTreeController.cs+++ b/src/Plugins/Payments.BrainTree/Areas/Admin/Controllers/PaymentBrainTreeController.cs@@ -52,7 +52,7 @@ namespace Payments.BrainTree.ControllersDisplayOrder = _brainTreePaymentSettings.DisplayOrder};- return View("~/Plugins/Payments.BrainTree/Views/Configure.cshtml", model);+ return View(model);}[HttpPost]diff --git a/src/Plugins/Payments.BrainTree/Views/Configure.cshtml b/src/Plugins/Payments.BrainTree/Areas/Admin/Views/PaymentBrainTree/Configure.cshtmlsimilarity index 100%rename from src/Plugins/Payments.BrainTree/Views/Configure.cshtmlrename to src/Plugins/Payments.BrainTree/Areas/Admin/Views/PaymentBrainTree/Configure.cshtmldiff --git a/src/Plugins/Payments.BrainTree/Areas/Admin/Views/_ViewImports.cshtml b/src/Plugins/Payments.BrainTree/Areas/Admin/Views/_ViewImports.cshtmlnew file mode 100644index 000000000..2fb08c043--- /dev/null+++ b/src/Plugins/Payments.BrainTree/Areas/Admin/Views/_ViewImports.cshtml@@ -0,0 +1,8 @@+@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers+@addTagHelper *, Grand.Web.Common+@addTagHelper *, Grand.Web++@using Microsoft.AspNetCore.Mvc.ViewFeatures+@using Grand.Infrastructure.Extensions++@inject Grand.Web.Common.Localization.LocService Locdiff --git a/src/Plugins/Payments.BrainTree/Components/PaymentBrainTreeScripts.cs b/src/Plugins/Payments.BrainTree/Components/PaymentBrainTreeScripts.csindex 12be71274..33b3a89e6 100644--- a/src/Plugins/Payments.BrainTree/Components/PaymentBrainTreeScripts.cs+++ b/src/Plugins/Payments.BrainTree/Components/PaymentBrainTreeScripts.cs@@ -7,7 +7,7 @@ namespace Payments.BrainTree.Components{public IViewComponentResult Invoke(){- return View("~/Plugins/Payments.BrainTree/Views/PaymentPaymentBrainTreeScripts.cshtml");+ return View();}}}diff --git a/src/Plugins/Payments.BrainTree/Components/PaymentBrainTreeViewComponent.cs b/src/Plugins/Payments.BrainTree/Components/PaymentBrainTreeViewComponent.csindex 627e5ed57..1ea19bddf 100644--- a/src/Plugins/Payments.BrainTree/Components/PaymentBrainTreeViewComponent.cs+++ b/src/Plugins/Payments.BrainTree/Components/PaymentBrainTreeViewComponent.cs@@ -65,7 +65,7 @@ namespace Payments.BrainTree.ComponentsViewBag.ClientToken = gateway.ClientToken.Generate();ViewBag.OrderTotal = (await _orderTotalCalculationService.GetShoppingCartTotal(cart)).shoppingCartTotal;- return View("~/Plugins/Payments.BrainTree/Views/PaymentInfo_3DS.cshtml", model);+ return View(this.GetViewPath("PaymentInfo_3DS"), model);}//years@@ -92,7 +92,7 @@ namespace Payments.BrainTree.Components//set postback values (we cannot access "Form" with "GET" requests)if (Request.Method == WebRequestMethods.Http.Get)- return View("~/Plugins/Payments.BrainTree/Views/PaymentInfo.cshtml", model);+ return View(this.GetViewPath("PaymentInfo"), model);var form = await HttpContext.Request.ReadFormAsync();@@ -117,8 +117,7 @@ namespace Payments.BrainTree.Componentsselect error.ErrorMessage;model.Errors = string.Join(", ", query);}-- return View("~/Plugins/Payments.BrainTree/Views/PaymentInfo.cshtml", model);+ return View(this.GetViewPath("PaymentInfo"), model);}}}\ No newline at end of filediff --git a/src/Plugins/Payments.BrainTree/Payments.BrainTree.csproj b/src/Plugins/Payments.BrainTree/Payments.BrainTree.csprojindex e2ce318f5..83b6a524a 100644--- a/src/Plugins/Payments.BrainTree/Payments.BrainTree.csproj+++ b/src/Plugins/Payments.BrainTree/Payments.BrainTree.csproj@@ -1,8 +1,10 @@-<Project Sdk="Microsoft.NET.Sdk">+<Project Sdk="Microsoft.NET.Sdk.Razor"><PropertyGroup><TargetFramework>net5.0</TargetFramework><PackageProjectUrl>https://grandnode.com/</PackageProjectUrl>+ <Company>UNIT-SOFT Sp. z o.o.</Company>+ <AddRazorSupportForMvc>true</AddRazorSupportForMvc></PropertyGroup><PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">@@ -82,21 +84,6 @@<None Update="logo.jpg"><CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory></None>- <None Update="Views\Configure.cshtml">- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>- </None>- <None Update="Views\PaymentPaymentBrainTreeScripts.cshtml">- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>- </None>- <None Update="Views\PaymentInfo.cshtml">- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>- </None>- <None Update="Views\PaymentInfo_3DS.cshtml">- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>- </None>- <None Update="Views\_ViewImports.cshtml">- <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>- </None></ItemGroup></Project>diff --git a/src/Plugins/Payments.BrainTree/Views/PaymentInfo.cshtml b/src/Plugins/Payments.BrainTree/Views/Shared/Components/PaymentBrainTree/PaymentInfo.cshtmlsimilarity index 100%rename from src/Plugins/Payments.BrainTree/Views/PaymentInfo.cshtmlrename to src/Plugins/Payments.BrainTree/Views/Shared/Components/PaymentBrainTree/PaymentInfo.cshtmldiff --git a/src/Plugins/Payments.BrainTree/Views/PaymentInfo_3DS.cshtml b/src/Plugins/Payments.BrainTree/Views/Shared/Components/PaymentBrainTree/PaymentInfo_3DS.cshtmlsimilarity index 100%rename from src/Plugins/Payments.BrainTree/Views/PaymentInfo_3DS.cshtmlrename to src/Plugins/Payments.BrainTree/Views/Shared/Components/PaymentBrainTree/PaymentInfo_3DS.cshtmldiff --git a/src/Plugins/Payments.BrainTree/Views/PaymentPaymentBrainTreeScripts.cshtml b/src/Plugins/Payments.BrainTree/Views/Shared/Components/PaymentBrainTreeScripts/Default.cshtmlsimilarity index 100%rename from src/Plugins/Payments.BrainTree/Views/PaymentPaymentBrainTreeScripts.cshtmlrename to src/Plugins/Payments.BrainTree/Views/Shared/Components/PaymentBrainTreeScripts/Default.cshtml