Commit Graph
48 Commits
Author SHA1 Message Date
kate522 db0d63b99f fix(pay): 会员卡密单密码默认关闭,卡密盒与其他弹窗一致显示卡号+密码
会员购买/续费弹窗卡密盒此前仅显示卡密输入,与其他两个弹窗(卡号+密码)
不一致。根因是 pay_vip_pass_charge_only_password 的默认值偏离参考主题:

- PaymentRuntime:vip 类型 only_password 由「未设置即视为开启」改为
  !empty(),与其他两类型同构(参考主题 default false)
- ChargeCard:get_public_options 的 vip 回退值 only_password true→false
- SchemaPayment + recharge.js:会员卡密单密码模式开关 default true→false
- 契约测试同步锁定默认关闭与无 isset 回退
- admin SPA 重新构建

已保存过设置且该键被持久化为开启的站点,需在后台「余额充值 → 卡密
兑换 → 会员卡密单密码模式」手动关闭一次。
2026-09-18 17:26:50 +08:00
kate522 b88eab0bfe feat(pay): 卡密兑换入口收敛到三个购买弹窗并对齐参考主题
- 移除余额卡片独立「卡密兑换」通用弹窗,兑换入口分布到充值/积分/会员三个弹窗的支付方式中
- 充值弹窗补齐卡密 logo 与仅卡密时的金额选择隐藏逻辑
- 积分购买弹窗 1:1 复刻参考主题 points-pay modal(商品档位/自定义/支付方式/立即支付),REST 改为 product+custom 契约
- 会员弹窗注入卡密渠道:视图模型透传 card_pass,前端渲染卡密盒并直兑 /pay/card-pass/redeem type=vip
- 后台卡密兑换拆分为余额/积分/会员三个独立开关,VIP 段旧会员卡密组清理
- REST type 改为必填(balance/vip/credits),三类型独立闸门
- 测试重写为 card-pass-modal-redeem 契约,321 项全部通过
2026-09-18 12:25:18 +08:00
kate522 64ed47165d fix(payment): 卡密兑换开关收敛为唯一总开关
- 问题:积分卡密兑换报「积分卡密兑换未开启」,因 asset_points_card_enabled
  与总开关并存为双重闸门;会员卡同样存在隐藏的第二开关 pay_vip_pass_charge_s。
- 修复:ChargeCard 类型闸门统一只消费后台「余额充值 → 卡密兑换」总开关;
  积分卡仅额外要求积分系统可用(系统级依赖,非独立开关)。
- 死代码清理:PaymentRuntime 删除 benefit.pass_charge/pass_charge_desc 映射;
  后台 schema 删除「卡密兑换会员」独立开关组与「启用积分卡密兑换」开关(双源同步);
  vip options 收敛为仅 only_password 展示配置。
- 验证:php -l 4 文件无错;契约测试 59/59 通过;容器内探针实测
  credits 类型闸门放行;SPA 已重建并同步运行副本。
2026-09-17 19:18:54 +08:00
kate522 3481620ed0 feat(payment): 通用卡密兑换弹窗并修正核销订单实付与订单名称
- /user/balance/ 余额卡片入口改为通用「卡密兑换」弹窗:请求不带类型,
  后端按卡密自动识别余额/会员/积分;卡号输入恒展示且选填
- 后台「余额充值 → 卡密充值」语义更新为「卡密兑换」,开关更名
  「启用卡密兑换功能」(设置键不变),双源 schema 同步并重建 SPA
- 删除死代码:credits-vip.php 死文件、credits-balance.php 内联积分
  兑换块、/pay/card-pass/options 路由与 rest_options、labels 数组、
  asset_points_card_description/password_only 死字段及内联块专属 CSS
- 卡密核销订单实付恒 0:create_redeem_order 源头写 0,UserOrders
  对 card_pass 订单视图层归零覆盖历史行(不迁移数据)
- 订单名称按 note.meta 生成:卡密兑换-余额充值X / 卡密兑换-积分充值X /
  购入[会员档位名]X天(永久)
- 新增契约 card-pass-universal-redeem.test.cjs,收紧 user-assets-layout
  契约(禁 .uc-card-pass 根类回潮)
2026-09-17 19:04:47 +08:00
kate522 ba8d4b1b90 卡密充值与兑换接入统一订单号与支付流水号
此前卡密核销虽已建订单,但订单号硬编码 CARD{卡ID}、渠道交易号硬编码
card_pass_{卡ID},均不受后台前缀控制;且核销产生的资金流水没有挂到
订单上(order_number 为 NULL),订单详情页的「支付流水号」恒为「—」。

ChargeCard:
- 新增 allocate_redeem_order_number():走 OrderRepository 统一分配器,
  消费后台「订单前缀」(payment_order_prefix)。
- 新增 card_pass_transaction_number():BusinessNumber::candidate(flow_prefix),
  消费后台「流水号前缀」(payment_flow_prefix)。
- 两条兑换路径(redeem_asset_card / redeem_vip_card)替换硬编码取号;
  create_redeem_order 接收调用方传入的交易号。
- 账本重放(replayed)时回取已落库订单号,不再把本次新分配的号回给前端。

FinancialFlowService:
- record_card_pass_payment():会员卡(0 元、无账本参与)直接落一条
  与订单关联、零分录的 order_payment 流水;record() 新增
  allow_empty_entries 通道(prepare_entries 拒绝 delta=0,占位分录不可行)。
- record_order_event() 新增凭证结算模式:豁免「金额必须 > 0」与
  「资产类订单不得记现金流水」两条门槛(卡密核销既无第三方现金流入,
  订单还可能为 0 元或以积分计价)。
- attach_order_to_ledger_flow():账本提交后把流水补挂到订单上,
  event_type 归一为 order_payment,使「支付流水号」可反查。
- is_successful_order_payment() 认可 card_pass 凭证结算;
  is_external_recharge() 把 card_pass 与 balance/points 一并列为平台内部
  结算方式,不再为卡密充值伪造现金出账分录(现金在售卡时已确认)。

关键取舍:随机订单号不得进入 LedgerCommand 的 metadata —— payload_hash
覆盖 metadata,会破坏账本幂等重放(实测撞 uniq_operation_key 后报
aksrt_ledger_idempotency_conflict),因此订单关联改在账本提交后补挂。

测试:新增 tests/admin/card-pass-order-numbers.test.cjs 钉住上述约束;
容器内三类卡密实测通过(订单号/渠道交易号/支付流水号三项均带后台前缀,
流水行分别携带 balance:in / points:in / 零分录),重放幂等恢复正常。
2026-09-17 14:15:55 +08:00
kate522 678143e7b9 feat(payment): 卡密管理改为独立页面并对齐参考主题
- 移除「余额充值」设置中的充值卡(card_pass_*)配置组,PHP schema 与 SPA mirror 双轨同步
- 重写后台卡密管理页:列表过滤/排序/搜索/批量删除/同款分页/点击复制、自动生成与导入、text/xls 导出
- ChargeCard 服务新增 generate_cards/rand_number/rand_password/delete_by_ids/get_export_rows,get_list 支持参考主题排序别名与标识过滤
- 删除无消费方的 /payment/charge-cards REST 路由及 batch_create/disable 死代码,数据层零迁移
2026-09-16 22:05:37 +08:00
kate522 a48007a44d feat(payment): 支付&付费菜单按参考主题重构并新增提现策略页
- 子菜单重组为知识付费/余额充值/VIP会员/创作分成/推广返佣/收款接口/提现策略
- 收款接口页 1:1 复刻 Zibll 双下拉结构,仅保留支付宝/微信/PayPal/Stripe/易支付
- 订单前缀/流水号前缀/提现单号前缀配置保留并移入收款接口页
- 知识付费/推广返佣按参考主题全字段复刻,余额充值并入充值卡配置
- 新增 tabbed/between_number/page_select 表单控件及后端 pages 搜索源
- 清理旧 SPA 组件、无消费者 REST 端点与废弃配置键(不写双路兼容)
- 更新存量契约测试至新 schema 文件
2026-09-16 19:18:28 +08:00
kate522 6bbb79213b fix(user-center): 优化提现记录弹窗分页 2026-09-16 12:53:38 +08:00
kate522 9dc278bd83 fix payment points 2026-09-04 23:35:19 +08:00
kate522 4833053a5c fix(email): complete mail settings and templates 2026-09-04 12:06:42 +08:00
kate522 e5df6fdaa7 进行了一些小优化 2026-08-25 06:58:09 +08:00
kate522 8ddbfdd7b7 进行了一些小优化 2026-08-25 06:02:26 +08:00
kate522 75d1e6e53b 进行了一些小优化 2026-08-25 05:59:50 +08:00
kate522 07c4e969c3 新增全局流水号 2026-08-25 05:33:01 +08:00
kate522 6674bded6a 进行了一些小优化 2026-08-24 17:40:35 +08:00
kate522 85a124b886 修复支付状态问题 2026-08-24 17:21:06 +08:00
kate522 406fb8d6a6 修复两个问题 2026-08-24 16:52:26 +08:00
kate522 58f3f42bf8 修复两个问题 2026-08-24 16:38:03 +08:00
kate522 5cae5b5c93 积分与余额账务系统硬切重构 2026-08-24 15:59:11 +08:00
kate522 9375b1c30c refactor(assets): vendor 资产迁入标准目录并全仓去除 zibll 标识
- assets/vendor 全量迁移: fontawesome5→assets/fontawesome5, css→assets/css,
  js→assets/js/runtime(避开 14 个同名自有文件), img 合并去重→assets/img,
  fonts→assets/fonts; 删除 assets/vendor
- libs 五个与 widgets/third-party 字节相同的库不重复入库, loader paths 改指向
- 运行时切换: _win.uri=assets 根, loader baseUrl=/js/runtime, enlighter 注入
  路径同步; PHP 7 个引用文件切换并改名 $zibll_*→$runtime_*
- 去品牌: Qinver 头注释/品牌 console.log/演示链接清除, 默认文案中性化
- 功能标识符改名: zib__→aksrt__, zib_ajax→aksrt_ajax, window.zib→
  window.aksrtLegacy, zibllblock/*→aksrtblock/*, .zib-widget→.aksrt-panel,
  .zib-slider→.aksrt-slider, zib_menu_options meta 键等
- 自有 CSS 改名: legacy-utilities/compat-vars/footer shell
- admin SPA 重建; 契约测试同步(路径/断言/文件更名)
- 例外保留: tests/visual 对照环境与 fixtures 前缀(外部 Zibll 产品引用)

验证: php -l 133 个改动文件通过; runtime 86 个 JS node --check 通过;
契约测试 68/70(2 个失败经 stash 对照确认为存量问题)
2026-08-22 16:16:30 +08:00
kate522 6c6c462df8 refactor: remove forum and topic feature chains 2026-08-17 14:52:19 +08:00
kate522 566d39c3ae fix: register referral operations for administrators 2026-08-17 14:08:32 +08:00
kate522 b501cf4611 feat: unify invite flow with referral ref 2026-08-17 13:49:59 +08:00
kate522 929603b9e2 feat: adjust affiliate commissions and withdrawal strategy 2026-08-16 23:11:01 +08:00
kate522 853114a9f9 fix: improve promotion tabs and referral layout 2026-08-16 21:28:02 +08:00
kate522 ff730ab593 feat: unify referral promotion tabs and compact earnings UI 2026-08-16 20:40:21 +08:00
kate522 8799063c6c feat: redesign promotion earnings cards 2026-08-16 20:15:56 +08:00
kate522 698a9beb74 feat: upgrade widgets and affiliate commission flow 2026-08-16 18:29:31 +08:00
kate522 1247f9bf4e feat(credits): exchange balance for points
Replace the legacy points-to-balance and external points purchase flows
with direct integer balance-to-points exchange. Enforce exchange and
points-transfer limits and capability checks across the UI and REST API.
2026-08-13 15:20:06 +08:00
kate522 ce2b266890 fix(users): keep management inside center 2026-08-12 20:59:31 +08:00
kate522 dacd0095bf feat(users): normalize center routes and withdrawal limits 2026-08-12 19:44:47 +08:00
kate522 69dd3b66ab fix(orders): enforce configured expiry
Apply the configured order lifetime to all checkout flows and close unpaid orders once their expiry is reached.
2026-08-12 17:49:54 +08:00
kate522 73216ee6e5 fix(payment): settle income at cycle boundary 2026-08-07 16:27:53 +08:00
kate522 e8e39c1ef3 fix(payment): validate creator order type 2026-08-07 13:34:57 +08:00
kate522 7cca472fe9 fix(payment): close creator income contract gaps 2026-08-07 13:30:37 +08:00
kate522 cfb0a1368c fix(user-center): close creator income review gaps 2026-08-07 13:16:10 +08:00
kate522 c16add0807 fix(payment): normalize revenue currency filters 2026-08-07 12:53:57 +08:00
kate522 50ac2119f1 fix(payment): constrain creator income counts 2026-08-07 12:48:27 +08:00
kate522 e20418e909 feat(payment): separate creator income settlement 2026-08-07 12:39:32 +08:00
kate522andClaude Fable 5 9e6ae32fc1 feat(payment): complete creator income center
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-07 10:59:58 +08:00
kate522 450b9f44b9 feat: add creator income order tracking\n\nCo-Authored-By: Claude Fable 5 <noreply@anthropic.com> 2026-08-07 09:15:42 +08:00
kate522andClaude Fable 5 50236b07fa fix(payment): refresh rebate metrics and unify withdrawal statuses
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 14:06:28 +08:00
kate522andClaude Fable 5 02fcde3c84 fix(user-center): load revenue tabs without refresh
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-06 10:42:32 +08:00
kate522 39c92017d9 feat(user-center): merge promotion rewards into revenue 2026-08-05 23:43:16 +08:00
kate522andClaude Fable 5 5375ad6429 perf(modal): unify cancellable frontend modal flows
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-05 02:04:55 +08:00
kate522 49c12b761f feat(users): merge promotion into revenue center 2026-08-03 15:38:17 +08:00
kate522 26d307056e feat(orders): redesign user order center 2026-08-03 12:54:58 +08:00
kate522 8c5b1555c9 refactor: flatten src/AKSRT → src (drop theme-identifier dir)
Move all domain folders from src/AKSRT/{Domain} to src/{Domain}; remap
Composer PSR-4 "AKSRT\\": "src/"; update audit script + README + ADR
paths; remove dead tools/build-psr4-map.php (scanned deleted inc/classes).
2026-08-02 22:06:06 +08:00