Schema 收口第四轮:补齐 payment gateway 的 PHP 依赖契约

继续 Workstream C,对 payment.gateway 做 PHP schema 收口:

- 为 wechat / alipay / paypal 三组网关配置补齐 dependsOn,确保 provider 配置只在对应
  payment_*_enabled 开启后展开。
- 延续前几轮的目标:让 PHP schema 与前端 schema 一样,真正承担“总开关 -> 子配置”的
  单一真理源角色,而不是仅前端层面做折叠展示。

说明:本轮原计划同时继续推进 page_display,但审阅后发现 page_display 的剩余问题以
  结构性差异(缺少真正的 home 主 section、float-btn 在前端 schema 层未建模完整)为主,
  不适合和本轮 payment gateway 的机械对齐混在一个提交里,因此先独立完成 gateway 收口。

验证:
- php -l 通过:class-aksrt-admin-schema-payment.php
- node --check 已复核 payment/post-list 前几轮前端 schema 文件仍通过

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-06 23:46:41 +08:00
co-authored by Claude Fable 5
parent ba61a20b34
commit 6a7bcc8bf7
@@ -228,24 +228,24 @@ class AKSRT_Admin_Schema_Payment {
['key' => 'payment_stripe_enabled', 'label' => 'Stripe', 'type' => 'switch', 'default' => false],
]],
['key' => 'wechat', 'title' => '微信支付配置', 'fields' => [
['key' => 'wechat_merchantid', 'label' => '商户号', 'type' => 'input', 'default' => ''],
['key' => 'wechat_jsapi', 'label' => 'JSAPI密钥', 'type' => 'input', 'default' => ''],
['key' => 'wechat_appsecret', 'label' => 'AppSecret', 'type' => 'input', 'default' => ''],
['key' => 'wechat_cert_path', 'label' => '证书路径', 'type' => 'input', 'default' => ''],
['key' => 'wechat_key_path', 'label' => '密钥路径', 'type' => 'input', 'default' => ''],
['key' => 'wechat_merchantid', 'label' => '商户号', 'type' => 'input', 'default' => '', 'dependsOn' => ['key' => 'payment_wechat_enabled', 'value' => true]],
['key' => 'wechat_jsapi', 'label' => 'JSAPI密钥', 'type' => 'input', 'default' => '', 'dependsOn' => ['key' => 'payment_wechat_enabled', 'value' => true]],
['key' => 'wechat_appsecret', 'label' => 'AppSecret', 'type' => 'input', 'default' => '', 'dependsOn' => ['key' => 'payment_wechat_enabled', 'value' => true]],
['key' => 'wechat_cert_path', 'label' => '证书路径', 'type' => 'input', 'default' => '', 'dependsOn' => ['key' => 'payment_wechat_enabled', 'value' => true]],
['key' => 'wechat_key_path', 'label' => '密钥路径', 'type' => 'input', 'default' => '', 'dependsOn' => ['key' => 'payment_wechat_enabled', 'value' => true]],
]],
['key' => 'alipay', 'title' => '支付宝配置', 'fields' => [
['key' => 'alipay_appid', 'label' => 'AppID', 'type' => 'input', 'default' => ''],
['key' => 'alipay_privatekey', 'label' => '应用私钥', 'type' => 'input', 'default' => ''],
['key' => 'alipay_publickey', 'label' => '支付宝公钥', 'type' => 'input', 'default' => ''],
['key' => 'alipay_return_url', 'label' => '同步回调地址', 'type' => 'input', 'default' => ''],
['key' => 'alipay_notify_url', 'label' => '异步回调地址', 'type' => 'input', 'default' => ''],
['key' => 'alipay_appid', 'label' => 'AppID', 'type' => 'input', 'default' => '', 'dependsOn' => ['key' => 'payment_alipay_enabled', 'value' => true]],
['key' => 'alipay_privatekey', 'label' => '应用私钥', 'type' => 'input', 'default' => '', 'dependsOn' => ['key' => 'payment_alipay_enabled', 'value' => true]],
['key' => 'alipay_publickey', 'label' => '支付宝公钥', 'type' => 'input', 'default' => '', 'dependsOn' => ['key' => 'payment_alipay_enabled', 'value' => true]],
['key' => 'alipay_return_url', 'label' => '同步回调地址', 'type' => 'input', 'default' => '', 'dependsOn' => ['key' => 'payment_alipay_enabled', 'value' => true]],
['key' => 'alipay_notify_url', 'label' => '异步回调地址', 'type' => 'input', 'default' => '', 'dependsOn' => ['key' => 'payment_alipay_enabled', 'value' => true]],
]],
['key' => 'paypal', 'title' => 'PayPal配置', 'fields' => [
['key' => 'paypal_client_id', 'label' => 'Client ID', 'type' => 'input', 'default' => ''],
['key' => 'paypal_client_secret', 'label' => 'Client Secret', 'type' => 'input', 'default' => ''],
['key' => 'paypal_currency', 'label' => '货币', 'type' => 'input', 'default' => 'USD'],
['key' => 'paypal_sandbox', 'label' => '沙箱模式', 'type' => 'switch', 'default' => true],
['key' => 'paypal_client_id', 'label' => 'Client ID', 'type' => 'input', 'default' => '', 'dependsOn' => ['key' => 'payment_paypal_enabled', 'value' => true]],
['key' => 'paypal_client_secret', 'label' => 'Client Secret', 'type' => 'input', 'default' => '', 'dependsOn' => ['key' => 'payment_paypal_enabled', 'value' => true]],
['key' => 'paypal_currency', 'label' => '货币', 'type' => 'input', 'default' => 'USD', 'dependsOn' => ['key' => 'payment_paypal_enabled', 'value' => true]],
['key' => 'paypal_sandbox', 'label' => '沙箱模式', 'type' => 'switch', 'default' => true, 'dependsOn' => ['key' => 'payment_paypal_enabled', 'value' => true]],
]],
['key' => 'xunhupay', 'title' => '虎皮椒配置', 'fields' => [
['key' => 'xunhupay_appid', 'label' => 'AppID', 'type' => 'input', 'default' => ''],