Pay Payment System
Based on the latest RuoyiPlus backend architecture, 14 DOs / 19 Controllers, menu ID starting from 12500, building a unified payment and fund management platform
1. Enhancement Positioning and Architecture
1.1 Product Positioning
RuoYiPlus Pay focuses on three core areas for enterprise enhancement: Multi-Channel Payment, Fund Management, and Transaction Security, building a unified payment infrastructure.
1.2 Module Scale
| Metric | Value |
|---|---|
| Data Objects (DO) | 14 |
| Controllers | 19 |
| Menu ID Start | 12500 |
| Maven Module | yudao-module-pay |
1.3 Core Data Tables
| Table Name | Description |
|---|---|
pay_order | Payment Orders |
pay_refund | Refund Management |
pay_transfer | Transfer Management |
pay_wallet | Wallet Management |
pay_recharge | Recharge Management |
pay_channel | Payment Channels |
pay_app | Payment Applications |
graph TB
subgraph "RuoYiPlus Pay Enhanced Architecture"
subgraph "Payment Channels"
A1[WeChat Pay]
A2[Alipay]
A3[UnionPay]
A4[Balance Payment]
end
subgraph "Payment Capabilities"
B1[Payment Ordering]
B2[Payment Refund]
B3[Transfer Payment]
B4[Wallet Management]
end
subgraph "Fund Management"
C1[Recharge Management]
C2[Reconciliation Management]
C3[Bill Management]
end
subgraph "Control Layer"
D1[Payment Security]
D2[Risk Control Management]
D3[Operation Audit]
end
end
A1 --> B1
A2 --> B1
A3 --> B1
A4 --> B1
B1 --> B2
B2 --> B3
B3 --> B4
B4 --> C1
C1 --> C2
C2 --> C3
B1 --> D1
B2 --> D2
C3 --> D3
1.4 Capability Comparison
| Dimension | Traditional Solution | RuoYiPlus Pay Enhanced |
|---|---|---|
| Payment Channels | Single channel | WeChat + Alipay + UnionPay |
| Refund Management | Manual processing | Automatic refund + original route return |
| Wallet Management | None | Balance + recharge + withdrawal |
| Reconciliation | Manual reconciliation | Automatic reconciliation + discrepancy handling |
| Transfer Payment | None | Enterprise payment to user balance |
| Security & Risk | None | Payment security + risk control |
| Audit & Compliance | Simple logging | Full-chain payment audit |
2. Payment Channel Management
2.1 Multi-Channel Access
graph TB
subgraph "Payment Channels"
subgraph "WeChat Pay"
A1[JSAPI Payment]
A2[Mini Program Payment]
A3[H5 Payment]
A4[Native Payment]
end
subgraph "Alipay"
B1[Mobile Website Payment]
B2[Desktop Website Payment]
B3[QR Code Payment]
end
subgraph "UnionPay"
C1[Gateway Payment]
C2[No-Redirect Payment]
end
subgraph "Balance Payment"
D1[Wallet Balance]
D2[Points Deduction]
end
end
| Payment Channel | Supported Methods |
|---|---|
| WeChat Pay | JSAPI / Mini Program / H5 / Native / APP |
| Alipay | Mobile Website / Desktop Website / QR Code / APP |
| UnionPay | Gateway Payment / No-Redirect Payment |
| Balance Payment | Wallet Balance / Points Deduction |
3. Payment Transaction Management
3.1 Payment Flow
graph TB
A[Business Ordering] --> B[Create Payment Order]
B --> C[Select Payment Channel]
C --> D[Initiate Payment]
D --> E{Payment Result}
E -->|Success| F[Payment Callback]
E -->|Failed| G[Payment Closure]
F --> H[Business Notification]
H --> I[Transaction Complete]
D --> D1[Get Payment Parameters]
D --> D2[Invoke Payment]
D --> D3[Wait for Payment]
F --> F1[Signature Verification]
F --> F2[Update Status]
F --> F3[Notify Business]
3.2 Core Capabilities
| Capability | Description |
|---|---|
| Payment Ordering | Unified payment order interface |
| Payment Refund | Original route refund + partial refund |
| Payment Query | Real-time payment status query |
| Payment Callback | Async notification + signature verification |
| Payment Closure | Timeout closure + manual closure |
4. Wallet and Fund Management
4.1 Wallet System
graph LR
A[Recharge] --> B[Wallet Balance]
B --> C[Consumption Payment]
B --> D[Withdrawal]
C --> E[Transaction Records]
D --> E
A --> E
| Capability | Description |
|---|---|
| Wallet Recharge | Multi-channel recharge |
| Balance Payment | Wallet balance payment |
| Withdrawal Management | Withdrawal request + approval |
| Bill Management | Transaction records + billing |
| Reconciliation | Automatic reconciliation + discrepancy handling |
5. Technical Architecture
graph TB
subgraph "yudao-module-pay-plus"
subgraph "pay-biz"
A1[order Payment Orders]
A2[refund Refund Management]
A3[transfer Transfer Management]
A4[wallet Wallet Management]
A5[recharge Recharge Management]
A6[channel Channel Management]
A7[app Application Management]
A8[notify Callback Notification]
A9[reconciliation Reconciliation Management]
end
subgraph "Permissions & Audit"
B1[security Payment Security]
B2[audit Audit Logs]
B3[risk Risk Control Management]
end
end
A1 --> B1
A2 --> B2
A3 --> B2
A4 --> B3
A5 --> B2
6. Business Value
| Value Point | Description |
|---|---|
| Payment Convenience | Unified multi-channel access |
| Fund Security | Payment security + risk control management |
| Efficient Reconciliation | Automatic reconciliation + discrepancy handling |
| Fund Management | Wallet + recharge + withdrawal |
| Compliance Audit | Full-chain payment audit |
| Flexible Extension | Pluggable payment channels |