feat(payment): 虎皮椒聚合支付 - 官方插件与跨平台可执行文件

新增 xunhupay 官方包,支付 RPC 与宿主只保留订单和验签边界;官方支付包同时带上各系统 provider,避免把 Linux ELF 当成本机入口。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ddCat
2026-09-17 23:32:11 +08:00
parent e5a5f0ccc8
commit a23df0cb32
63 changed files with 2070 additions and 128 deletions

View File

@@ -0,0 +1,20 @@
const IMAGE_PATH = /\.(?:png|jpe?g|gif|webp|bmp|svg)$/i;
const QRCODE_PATH = /(?:^|\/)qrcode(?:[-_./]|$)/i;
/** 渠道已生成的二维码图片地址,应直接展示,不能再编码成新的二维码。 */
export function isPaymentQrImageURL(value: string): boolean {
const raw = value.trim();
if (!raw) {
return false;
}
let parsed: URL;
try {
parsed = new URL(raw);
} catch {
return false;
}
if (parsed.protocol !== "https:" && parsed.protocol !== "http:") {
return false;
}
return IMAGE_PATH.test(parsed.pathname) || QRCODE_PATH.test(parsed.pathname);
}