feat: 新增后端支付模块,支持微信和支付宝

- 新增api/payment/支付服务(微信、支付宝)
- 新增api/routers/payment.py支付路由
- 更新database/models.py支付相关模型
- 新增数据库迁移文件(订单表、用户订阅字段)
- 更新main.py、requirements.txt、.env.production

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
iammm0
2026-02-10 14:23:29 +08:00
parent 6526c08c3a
commit e39fd97e06
14 changed files with 1351 additions and 5 deletions

23
api/payment/__init__.py Normal file
View File

@@ -0,0 +1,23 @@
"""
独立可复用的支付模块
支持微信支付 APP 支付和支付宝 APP 支付
"""
from .service import PaymentService
from .config import PaymentConfig
from .exceptions import (
PaymentError,
PaymentConfigError,
PaymentCreateError,
PaymentNotifyError,
PaymentQueryError,
)
__all__ = [
"PaymentService",
"PaymentConfig",
"PaymentError",
"PaymentConfigError",
"PaymentCreateError",
"PaymentNotifyError",
"PaymentQueryError",
]