(string)mnbt_plugin_option_get('epay', 'apiurl', ''), 'pid' => (string)mnbt_plugin_option_get('epay', 'pid', ''), 'key' => (string)mnbt_plugin_option_get('epay', 'key', ''), ]; $configured = $cfg['apiurl'] !== '' && $cfg['pid'] !== '' && $cfg['key'] !== ''; // 计算站点根 URL(admin/plugin.php → 去掉 /admin) $scriptName = str_replace('\\', '/', $_SERVER['SCRIPT_NAME'] ?? ''); $siteRoot = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' ? 'https://' : 'http://') . ($_SERVER['HTTP_HOST'] ?? 'localhost') . substr($scriptName, 0, strrpos($scriptName, '/')); // 去掉 /plugin.php // 再去掉末尾的 /admin(如果存在) if (substr($siteRoot, -6) === '/admin') { $siteRoot = substr($siteRoot, 0, -6); } // 回调地址统一用 index.php?_r= 兼容路由:不依赖服务器伪静态重写 $notifyUrl = $siteRoot . '/index.php?_r=/pay/epay/notify'; $returnUrl = $siteRoot . '/index.php?_r=/pay/epay/return'; ?>

易支付设置

配置彩虹易支付协议的接口地址、商户 ID 与密钥

说明:本页仅配置易支付的 API 凭证。是否在客户端显示该插件的付款方式,请前往 支付设置 启用。
易支付站点根 URL,需以 / 结尾
未配置:请填写完整的三项参数,否则易支付相关付款方式将不可用。
已配置:易支付凭证已就绪。可在 支付设置 启用支付宝/微信/QQ 钱包。

回调地址

在易支付商户后台无需手动配置,本插件自动注册

类型URL
异步通知(notify_url)
同步返回(return_url)
回调路径由系统通过通用路由自动注册,无需在 Web 服务器上单独配置。若使用 nginx,请确保未命中的请求被转发到 index.php(详见插件开发文档)。