Browse Source

added payment widget

pull/47/head
Galip Tolga Erdem 5 years ago
parent
commit
9fa780d4f1
  1. 6
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/Default.cshtml
  2. 15
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/PaymentWidgetScriptContributor.cs
  3. 7
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/PaymentWidgetStyleContributor.cs
  4. 20
      apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/PaymentWidgetViewComponent.cs
  5. 6
      apps/public-web/src/EShopOnAbp.PublicWeb/Pages/Payment.cshtml
  6. 0
      apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/components/payment/payment-widget.css
  7. 3
      apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/components/payment/payment-widget.js

6
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/Default.cshtml

@ -0,0 +1,6 @@
@using EShopOnAbp.Localization
@using Microsoft.Extensions.Localization
@inject IStringLocalizer<EShopOnAbpResource> L
<div>
</div>

15
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/PaymentWidgetScriptContributor.cs

@ -0,0 +1,15 @@
using System.Collections.Generic;
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
using Volo.Abp.AspNetCore.Mvc.UI.Packages.SignalR;
using Volo.Abp.Modularity;
namespace EShopOnAbp.PublicWeb.Components.Payment;
[DependsOn(typeof(SignalRBrowserScriptContributor))]
public class PaymentWidgetScriptContributor : BundleContributor
{
public override void ConfigureBundle(BundleConfigurationContext context)
{
context.Files.AddIfNotContains("/components/payment/payment-widget.js");
}
}

7
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/PaymentWidgetStyleContributor.cs

@ -0,0 +1,7 @@
using Volo.Abp.AspNetCore.Mvc.UI.Bundling;
namespace EShopOnAbp.PublicWeb.Components.Payment;
public class PaymentWidgetStyleContributor: BundleContributor
{
}

20
apps/public-web/src/EShopOnAbp.PublicWeb/Components/Payment/PaymentWidgetViewComponent.cs

@ -0,0 +1,20 @@
using System.Threading.Tasks;
using Microsoft.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc;
using Volo.Abp.AspNetCore.Mvc.UI.Widgets;
namespace EShopOnAbp.PublicWeb.Components.Payment;
[Widget(
AutoInitialize = true,
RefreshUrl = "/Widgets/Payment",
StyleTypes = new[] {typeof(PaymentWidgetStyleContributor)},
ScriptTypes = new[] {typeof(PaymentWidgetScriptContributor)}
)]
public class PaymentWidgetViewComponent: AbpViewComponent
{
public async Task<IViewComponentResult> InvokeAsync()
{
return await Task.FromResult(View("~/Components/Payment/Default.cshtml"));
}
}

6
apps/public-web/src/EShopOnAbp.PublicWeb/Pages/Payment.cshtml

@ -1,10 +1,14 @@
@page
@using EShopOnAbp.Localization
@using EShopOnAbp.PublicWeb.Components.Payment
@using Microsoft.Extensions.Localization
@model EShopOnAbp.PublicWeb.Pages.PaymentModel
@inject IStringLocalizer<EShopOnAbpResource> L
<div class="row">
<h3 class="pt-5 pb-4 text-center">@L["Payment"]</h3>
<div id="PaymentArea">
@await Component.InvokeAsync(typeof(PaymentWidgetViewComponent))
</div>
</div>

0
apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/components/payment/payment-widget.css

3
apps/public-web/src/EShopOnAbp.PublicWeb/wwwroot/components/payment/payment-widget.js

@ -0,0 +1,3 @@
(function () {
})();
Loading…
Cancel
Save