Payment module provides an API to make payments via using PayPal easily.
The Payment module provides reusable APIs and UI integration for creating payment requests and completing PayPal checkout flows. EventHub uses it from the public web application to sell premium organization plans and receive payment completion/failure events.
## Module structure
* `src/Payment.Domain.Shared`: Constants, localization, permissions, and shared contracts.
* `src/Payment.Domain`: Payment request domain model and domain services.
* `src/Payment.Application.Contracts`: Application service contracts and DTOs.
* `src/Payment.Application`: Payment request application services and PayPal integration logic.
* `src/Payment.HttpApi`: Public HTTP API endpoints.
* `src/Payment.Web`: MVC/Razor Pages UI integration for checkout pages.
* `src/Payment.Admin.*`: Admin application services, HTTP APIs, HTTP API clients, and Blazor admin UI.
* `src/Payment.EntityFrameworkCore`: EF Core mapping for payment entities.
## Installation
TODO
This module is already included in the EventHub solution and is initialized by the root solution tasks.
When opening the solution in ABP Studio, run or allow the **Initialize Solution** task from the **Default** run profile. It starts PostgreSQL/Redis, runs `abp install-libs`, and executes `EventHub.DbMigrator`, which applies the EventHub migrations that include this module's tables.
For manual setup from the repository root:
```powershell
./scripts/initialize-solution.ps1
```
Or run the individual steps:
```powershell
./etc/docker/up.ps1
abp install-libs
dotnet run --project src/EventHub.DbMigrator/EventHub.DbMigrator.csproj
```
The payment module does not have a separate standalone database in this solution; its EF Core mappings are part of the main EventHub database context.