wangjia
|
3f5e44581f
|
feat(v2): webhook v2 outbox + Notifier(event_type + HMAC 双向 + 重试兜底)
|
2026-07-10 11:25:14 +08:00 |
|
wangjia
|
af15f4736e
|
fix(v2): MarkAttemptPaid 按单scope+校验attempt命中 + OpenTestDB 唯一库名
- attempt UPDATE 加 out_trade_no 过滤并检查 RowsAffected,防止 order 已翻
paid 但 providerRef 错配导致没有对应 attempt 被标记的账本背离(未命中
时返回 error 触发事务回滚,order 保持 pending)
- 补测试覆盖 providerRef 错配场景:断言返回 error 且回滚后订单仍 pending
- OpenTestDB 改为每次调用生成唯一内存库名(atomic 计数器),避免同包多
测试共享 file::memory:?cache=shared 导致数据串扰
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-07-10 08:35:22 +08:00 |
|
wangjia
|
01887dd571
|
feat(v2): Order/Attempt/Account/Refund 模型 + 状态枚举 + :memory: 测试约定
v2 OrderStatus 三个值(Pending/Paid/Refunded)与 v1 model.OrderStatus 撞名,
统一加 V2 后缀(OrderPendingV2 等)规避包内重名;AttemptStatus/RefundStatus
无此冲突,原样保留。
|
2026-07-10 08:14:27 +08:00 |
|
wangjia
|
fd5f56f7de
|
feat: 微信V3 + 支付宝手机站/UA自适应 + 业务对接(签名下单/webhook) + 通用多业务
- 微信支付 V3 Native 渠道 (wechat.go):Native下单/回调AES-GCM解密验签/查单
- 支付宝:手机网站支付 wap.pay + 按 UA 自适应(PC page.pay扫码 / 手机拉App);qr_pay_mode=2 完整扫码收银台
- 业务对接:下单接口扩展(biz_system/biz_ref/return_url)+ HMAC 签名鉴权;支付成功 webhook 主动推送业务方 + 60s 重试 + BizNotifyLog
- 通用多业务:config.biz 改 map,加业务只改配置(BIZ_<SYS>_SECRET/_CALLBACK_URL)
- seedPlans:四档真实套餐 + promo_first_month(¥1) + test_liandiao(0.01),均挂 biz_code;/products 暴露 biz_code
- 删除沙箱 pay.html;对接设计文档入 docs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019UQmqWmV67sXGLrb3U1XXn
|
2026-07-03 22:44:34 +08:00 |
|
wangjia
|
6da6964451
|
初始提交:岩美 pay 收款服务(支付宝当面付 + 多商户多渠道架构)
- Go/Gin/GORM + 纯 Go SQLite(无 cgo)
- Channel 多渠道接口:支付宝当面付(precreate)/电脑网站支付(page.pay) 已实现,微信占位
- 多商户 merchants 表,回调验签+金额核对+幂等+查单兜底
- 收款页/结果页/二维码端点;docs/ 设计文档与部署 Runbook
- 密钥走环境变量/Bitwarden,不入库
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
2026-06-25 07:21:48 +08:00 |
|