'c1
This commit is contained in:
@@ -5,8 +5,7 @@ import { Link, useLocale } from "@/i18n/navigation";
|
||||
import { useTranslation } from "@/i18n/navigation";
|
||||
import JoinModal from "./JoinModal";
|
||||
import {
|
||||
getRecommendedChannel,
|
||||
mustUseWxPay,
|
||||
getPayEnv,
|
||||
redirectToPay,
|
||||
getDeviceFromEnv,
|
||||
} from "@/app/lib/payment";
|
||||
@@ -149,13 +148,8 @@ export default function HeroSection() {
|
||||
}
|
||||
const returnUrl =
|
||||
typeof window !== "undefined" ? `${window.location.origin}/${locale}/join/paid` : "/zh/join/paid";
|
||||
const env: PayEnv =
|
||||
typeof window !== "undefined"
|
||||
? navigator.userAgent.includes("MicroMessenger")
|
||||
? "wechat"
|
||||
: "pc"
|
||||
: "pc";
|
||||
const channel: PayChannel = mustUseWxPay(env) ? "wxpay" : getRecommendedChannel(env);
|
||||
const env = getPayEnv();
|
||||
const channel: PayChannel = "wxpay";
|
||||
redirectToPay({
|
||||
user_id,
|
||||
return_url: returnUrl,
|
||||
|
||||
Reference in New Issue
Block a user