Commit 6905942e authored by gdlcf88's avatar gdlcf88

Try register FreePaymentServiceProvider

parent a647720b
......@@ -9,7 +9,7 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="2.5.0" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Abstractions\EasyAbp.EShop.Payments.Abstractions.csproj" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Payments\src\EasyAbp.EShop.Payments.Domain\EasyAbp.EShop.Payments.Domain.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payments.WeChatPay.Domain.Shared\EasyAbp.EShop.Payments.WeChatPay.Domain.Shared.csproj" />
</ItemGroup>
......
using EasyAbp.EShop.Stores;
using EasyAbp.EShop.Payments.Payments;
using EasyAbp.EShop.Stores;
using Microsoft.Extensions.DependencyInjection;
using Volo.Abp;
using Volo.Abp.Modularity;
namespace EasyAbp.EShop.Payments
......@@ -9,6 +12,11 @@ namespace EasyAbp.EShop.Payments
)]
public class EShopPaymentsDomainModule : AbpModule
{
public override void OnApplicationInitialization(ApplicationInitializationContext context)
{
var resolver = context.ServiceProvider.GetService<IPaymentServiceResolver>();
resolver.TryRegisterProviderAsync("Free", typeof(FreePaymentServiceProvider));
}
}
}
......@@ -10,7 +10,6 @@
<ItemGroup>
<PackageReference Include="Volo.Abp.Ddd.Domain" Version="2.5.0" />
<ProjectReference Include="..\..\..\EasyAbp.EShop.Stores\src\EasyAbp.EShop.Stores.Domain.Shared\EasyAbp.EShop.Stores.Domain.Shared.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payments.Abstractions\EasyAbp.EShop.Payments.Abstractions.csproj" />
<ProjectReference Include="..\EasyAbp.EShop.Payments.Domain.Shared\EasyAbp.EShop.Payments.Domain.Shared.csproj" />
</ItemGroup>
......
......@@ -8,6 +8,11 @@ namespace EasyAbp.EShop.Payments.Payments
[Dependency(ServiceLifetime.Transient, TryRegister = true)]
public class FreePaymentServiceProvider : IPaymentServiceProvider
{
public FreePaymentServiceProvider()
{
}
public async Task<Payment> PayForOrderAsync(Payment payment, Dictionary<string, object> extraProperties = null)
{
throw new System.NotImplementedException();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment