# PaymentService

ABP version (opens new window) NuGet (opens new window) NuGet Download (opens new window) Discord online (opens new window) GitHub stars (opens new window)

An abp application module that provides payment service.

# Online Demo

We have launched an online demo for this module: https://pay.samples.easyabp.io (opens new window)

# Installation

  1. Install the following NuGet packages. (see how (opens new window))

    • 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
  2. Add DependsOn(typeof(PaymentServiceXxxModule)) attribute to configure the module dependencies. (see how (opens new window))

  3. Add builder.ConfigurePaymentService(); to the OnModelCreating() method in MyProjectMigrationsDbContext.cs.

  4. Add EF Core migrations and update your database. See: ABP document (opens new window).

# Usage

  1. 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);
    });
    
  2. Choose the payment service providers you want:

Payment

# Roadmap

  • [x] Prepayment.
  • [x] Support WeChatPay.
  • [ ] Support Paypal.
  • [ ] Support Alipay.
  • [ ] Support Bitcoin payment.
  • [x] Unit tests.
Last Updated: 8/26/2022, 9:14:33 AM