An abp application module that provides payment service.
-
Install the following NuGet packages. (see how)
- EasyAbp.PaymentService.Application
- EasyAbp.PaymentService.Application.Contracts
- EasyAbp.PaymentService.Domain
- EasyAbp.PaymentService.Domain.Shared
- EasyAbp.PaymentService.EntityFrameworkCore
- EasyAbp.PaymentService.HttpApi
- EasyAbp.PaymentService.HttpApi.Client
- (Optional) EasyAbp.PaymentService.MongoDB
- (Optional) EasyAbp.PaymentService.Web
-
Add
DependsOn(typeof(PaymentServiceXxxModule))
attribute to configure the module dependencies. (see how) -
Add
builder.ConfigurePaymentService();
to theOnModelCreating()
method in MyProjectMigrationsDbContext.cs. -
Add EF Core migrations and update your database. See: ABP document.
-
Register the Free payment method, it is used to pay when the amount is 0.00:
Configure<PaymentServiceOptions>(options => { options.Providers.Configure<FreePaymentServiceProvider>(FreePaymentServiceProvider.PaymentMethod); // options.Providers.Configure<PrepaymentPaymentServiceProvider>(PrepaymentPaymentServiceProvider.PaymentMethod); // options.Providers.Configure<WeChatPayPaymentServiceProvider>(WeChatPayPaymentServiceProvider.PaymentMethod); });
-
Choose the payment service providers you want:
- Free
- Prepayment
- WeChatPay
- Prepayment.
- Support WeChatPay.
- Support Paypal.
- Support Alipay.
- Support Bitcoin payment.
- Unit tests.