Skip to content

Conversation

@xxntmctx
Copy link

问题描述:
当 Xboard 部署在子目录(例如 https://domain.com/main/)时,支付功能生成的 return_url 会发生错误。
原因是 app/Helpers/Functions.php 中的 source_base_url 辅助函数在解析 Referer 时,只提取了 schemehost,忽略了 URL 中的路径部分 (path)。

这导致支付插件生成的跳转地址丢失了 /main/ 目录(变成了 https://domain.com/#/order/...),导致用户支付完成后无法正确跳转回订单页面。

修复内容:
修改了 source_base_url 函数的逻辑:
在解析 Referer 时,如果检测到 URL 中包含路径(path),则将其保留并拼接到 baseUrl 后面,从而正确支持子目录部署。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant