Files
chatwoot-ai-agent/fastadmin/chathub/config.php
T
GreatQiu 91104e58cf v1.8: FastAdmin chathub-addon — register/plan/payment/member-center + 5 channel bindings
- New fastadmin/chathub/ (11 files, 204K): user-facing FastAdmin ThinkPHP 5 addon
- _markOrderPaid() now calls _provisionAsync() on empty embed_code (closes 'paid but no code' gap)
- New reprovision() action — user-initiated resource rebuild
- payReturn() smart redirect: 3 branches (just_paid / provisioning / pending / fallback)
- status badge updated with 'provisioning' state (blue)
- _initialize() whitelist expanded: reprovision (user) + payNotify/payReturn (public webhook)
- 5 chathub_* tables (tenant/log/order/channel_account/gateway_log) + MIGRATIONS.md

Bugfixes during E2E:
- payNotify HTTP 500: tenant.status ENUM missing 'provisioning' value (DBA migration)
- payNotify HTTP 500: chathub_log.status='received' (not in ENUM) — changed to 'success'
- TP5 method signature: function reprovision(\$ids) does not read query string — use \$this->request->param('ids')
2026-06-05 14:20:00 +08:00

226 lines
6.0 KiB
PHP
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.
<?php
return [
[
'name' => 'provision_server_url',
'title' => 'Provision 服务地址',
'type' => 'string',
'group' => '系统',
'content' => [],
'value' => 'http://CoPaw:5566',
'rule' => 'required',
'msg' => '',
'tip' => 'QwenPaw 环境内的 Provision HTTP 服务地址',
'ok' => '',
'extend' => '',
],
[
'name' => 'site_name',
'title' => '站点名称',
'type' => 'string',
'group' => '系统',
'content' => [],
'value' => 'ChatHub',
'rule' => '',
'msg' => '',
'tip' => '产品名称,显示在页面标题和导航',
'ok' => '',
'extend' => '',
],
[
'name' => 'support_email',
'title' => '客服邮箱',
'type' => 'string',
'group' => '系统',
'content' => [],
'value' => '',
'rule' => 'email',
'msg' => '',
'tip' => '用户联系邮箱,注册成功通知会发到这里',
'ok' => '',
'extend' => '',
],
[
'name' => 'chatwoot_url',
'title' => 'Chatwoot 地址',
'type' => 'string',
'group' => 'Chatwoot',
'content' => [],
'value' => 'https://chatwoot.275763.xyz',
'rule' => 'required',
'msg' => '',
'tip' => 'Chatwoot 自托管地址',
'ok' => '',
'extend' => '',
],
[
'name' => 'chatwoot_api_token',
'title' => 'Chatwoot API Token',
'type' => 'string',
'group' => 'Chatwoot',
'content' => [],
'value' => '',
'rule' => 'required',
'msg' => '',
'tip' => 'Chatwoot 个人 Access Token(设置 → Profile → Access Token',
'ok' => '',
'extend' => '',
],
[
'name' => 'alipay_enabled',
'title' => '启用支付宝',
'type' => 'switch',
'group' => '支付宝',
'content' => [],
'value' => '0',
'rule' => '',
'msg' => '',
'tip' => '开启后注册/续费页显示支付宝支付选项',
'ok' => '',
'extend' => '',
],
[
'name' => 'alipay_app_id',
'title' => 'APPID',
'type' => 'string',
'group' => '支付宝',
'content' => [],
'value' => '',
'rule' => '',
'msg' => '',
'tip' => '支付宝开放平台应用 APPID(沙箱/生产不同)',
'ok' => '',
'extend' => '',
],
[
'name' => 'alipay_merchant_private_key',
'title' => '应用私钥',
'type' => 'textarea',
'group' => '支付宝',
'content' => [],
'value' => '',
'rule' => '',
'msg' => '',
'tip' => 'RSA2 私钥(应用公钥对应的私钥),-----BEGIN PRIVATE KEY----- 开头',
'ok' => '',
'extend' => '',
],
[
'name' => 'alipay_public_key',
'title' => '支付宝公钥',
'type' => 'textarea',
'group' => '支付宝',
'content' => [],
'value' => '',
'rule' => '',
'msg' => '',
'tip' => '支付宝公钥(不是应用公钥),用于验证回调签名',
'ok' => '',
'extend' => '',
],
[
'name' => 'alipay_sandbox',
'title' => '沙箱模式',
'type' => 'switch',
'group' => '支付宝',
'content' => [],
'value' => '1',
'rule' => '',
'msg' => '',
'tip' => '开启=沙箱环境(测试用),关闭=正式环境',
'ok' => '',
'extend' => '',
],
[
'name' => 'wechat_enabled',
'title' => '启用微信支付',
'type' => 'switch',
'group' => '微信支付',
'content' => [],
'value' => '0',
'rule' => '',
'msg' => '',
'tip' => '开启后注册/续费页显示微信支付选项',
'ok' => '',
'extend' => '',
],
[
'name' => 'wechat_app_id',
'title' => 'APPID',
'type' => 'string',
'group' => '微信支付',
'content' => [],
'value' => '',
'rule' => '',
'msg' => '',
'tip' => '微信开放平台/公众平台 APPID',
'ok' => '',
'extend' => '',
],
[
'name' => 'wechat_mch_id',
'title' => '商户号',
'type' => 'string',
'group' => '微信支付',
'content' => [],
'value' => '',
'rule' => '',
'msg' => '',
'tip' => '微信支付商户号',
'ok' => '',
'extend' => '',
],
[
'name' => 'wechat_api_v3_key',
'title' => 'APIv3 密钥',
'type' => 'string',
'group' => '微信支付',
'content' => [],
'value' => '',
'rule' => '',
'msg' => '',
'tip' => '微信支付 APIv3 密钥(商户平台 → API安全 → APIv3密钥)',
'ok' => '',
'extend' => '',
],
[
'name' => 'wechat_cert_path',
'title' => '商户证书路径',
'type' => 'string',
'group' => '微信支付',
'content' => [],
'value' => '',
'rule' => '',
'msg' => '',
'tip' => 'apiclient_cert.pem 绝对路径,例如 /www/sites/hub/certs/apiclient_cert.pem',
'ok' => '',
'extend' => '',
],
[
'name' => 'wechat_key_path',
'title' => '商户私钥路径',
'type' => 'string',
'group' => '微信支付',
'content' => [],
'value' => '',
'rule' => '',
'msg' => '',
'tip' => 'apiclient_key.pem 绝对路径',
'ok' => '',
'extend' => '',
],
[
'name' => 'wechat_sandbox',
'title' => '测试模式',
'type' => 'switch',
'group' => '微信支付',
'content' => [],
'value' => '1',
'rule' => '',
'msg' => '',
'tip' => '开启=测试号环境,关闭=正式环境',
'ok' => '',
'extend' => '',
],
];