Files
server-core/app/pay/__init__.py
T
Pine f1147dced3 feat(pay): 微信支付V3子应用与算力充值
- app/pay 独立支付子应用(config/wxpay/models/repository/service/routers),便于后期拆分微服务
- 充值订单表 0026_compute_recharge;套餐支持折扣(discount)与上架开关(enabled),DB system_configs 优先、env 兜底
- 统一小程序支付:桌面端出小程序码→扫码进小程序确认页按 openid 发起 JSAPI→回调幂等到账(引擎 adjust_user_quota+镜像回写)
- 内嵌 wechatpayv3(含 async_),响应验签失败降级告警;新增 aiofiles 依赖

Co-Authored-By: Claude <noreply@anthropic.com>
2026-08-30 22:29:44 +08:00

12 lines
628 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# -*- coding: utf-8 -*-
"""支付子应用(app/pay):微信支付 V3 + 算力充值。
独立子应用,便于后期整体拆分为支付微服务:
- ``config.py`` 商户配置与充值规则
- ``models.py`` 充值订单 ORM(注册进平台 Base.metadata,落主库,alembic 统一迁移)
- ``repository.py`` 订单仓储(行级操作)
- ``wxpay.py`` AsyncWeChatPay 客户端封装(懒加载 / 验签解密 / 下单 / 查单)
- ``service.py`` 充值业务(下单 / 回调到账 / 对账 / 幂等)
- ``routers.py`` 接口层(/opc/pay/notify 回调 + /opc/compute/recharge/*
"""