bindbox-game/.trae/documents/支付体系最终完善—执行清单.md
邹方成 6ee627139c
Some checks failed
Build docker and publish / linux (1.24.5) (push) Failing after 40s
feat: 新增支付测试小程序与微信支付集成
feat(pay): 添加支付API基础结构
feat(miniapp): 创建支付测试小程序页面与配置
feat(wechatpay): 配置微信支付参数与证书
fix(guild): 修复成员列表查询条件
docs: 更新代码规范文档与需求文档
style: 统一前后端枚举显示与注释格式
refactor(admin): 重构用户奖励发放接口参数处理
test(title): 添加称号效果参数验证测试
2025-11-17 00:42:08 +08:00

19 lines
1.2 KiB
Markdown
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.

## 后端
- 通知事件:入库 payment_notify_eventsnotify_id 唯一、processed 标记)、重复回调直接 ACK
- 积分恢复:部分退款按比例恢复(累计不超订单抵扣积分)、全额退款一次性恢复;幂等累计校验
- 退款查询GET /api/admin/pay/refunds分页筛选、GET /api/admin/pay/refunds/:refund_no详情
- 对账接口POST /api/admin/pay/bills/import入库账单、GET /api/admin/pay/bills/diffs差异查询/导出)
- 详情聚合:补充 transaction_id/success_time 与 payment_refunds 明细,计算累计已退与可退余额
## 前端
- 金额统一元格式化(两位小数);保留分供接口/导出
- 详情展示transaction_id/refund_no/channel/支付方式、累计已退与可退余额(元)
- 对账入口:账单导入与差异列表页面
## 幂等与安全
- 幂等键与唯一索引核查order_no/out_trade_no/notify_id/refund_no/transaction_id
- 条件更新控制并发;异常与差异告警
## 验收
- 单元/集成:换算与比例恢复、幂等、预下单→通知→退款→详情一致、对账导入与差异生成
- 前后端构建通过,联调验证无误