nomadro/app/vip/lib/payEnv.ts
eric 56b29205e7 Integrate four verticals into nomadro portal with shared packages and API gateway.
Mount /vip with nomadvip+payjsapi, add @nomadro/pay|pb|sdk, apps/api, /admin shell, and backup/rollback scripts under git.nomadro.cn workflow.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-28 20:16:44 -05:00

26 lines
623 B
TypeScript

/**
* VIP pay env — thin re-export of shared @nomadro/pay (modular decoupling).
* Prefer importing from @nomadro/pay in new code.
*/
export {
isWeChat,
isMobile,
getPayEnv,
getRecommendedChannel,
mustUseWxPay,
type PayEnv,
type PayChannel,
} from "@nomadro/pay";
import { getPayEnv as _getPayEnv, type PayEnv } from "@nomadro/pay";
export function getDeviceFromEnv(env: PayEnv): "pc" | "h5" | "wechat" {
if (env === "wechat") return "wechat";
return env === "pc" ? "pc" : "h5";
}
/** @deprecated use getPayEnv from @nomadro/pay */
export function detectPayEnv(): PayEnv {
return _getPayEnv();
}