冷知识-team 2个月免费怎么过

( 有时候过不去是号的问题,换个号apple pay一把过··· ) 论坛里6-7个帖子都试了一遍,我全部被拒绝了,无论是卡还是apple pay, 然后我很生气的换了个号: 用下线这个长链接就一把过了… (async function generateAUTeamLink() { console....
冷知识-team 2个月免费怎么过
冷知识-team 2个月免费怎么过

(有时候过不去是号的问题,换个号apple pay一把过···)
论坛里6-7个帖子都试了一遍,我全部被拒绝了,无论是卡还是apple pay,
然后我很生气的换了个号:

用下线这个长链接就一把过了…

(async function generateAUTeamLink() {
  console.log("⏳ 正在获取B Session Token...");

  // 自动获取登录凭证
  let accessToken;
  try {
    const s = await fetch("/api/auth/session").then(r => r.json());
    accessToken = s?.accessToken;
    if (!accessToken) throw new Error("accessToken 为空");
  } catch (e) {
    console.error("❌ 获取 Token 失败:", e.message);
    return;
  }
  console.log("✅ Token 获取成功");

  const COUPON = "STRIPEATLASGPT4BIZ050126";

  // ---- 以下为你提供的 Payload(仅修改 workspace_name 动态生成)----
  const payload = {
    plan_name: "chatgptteamplan",
    team_plan_data: {
      workspace_name: "workspace", // 可自行修改
      price_interval: "month",     // month 或 year
      seat_quantity: 2,            // 席位数量,Team 最少 2?1的话是另外种玩法,需要号
      
    },
    billing_details: {
      country: "US",
      currency: "USD"
    },
    cancel_url: "https://chatgpt.com/?promoCode=STRIPEATLASGPT4BIZ050126",
    promo_code: COUPON,                            // 注意这里用的是 promo_code 字段
    checkout_ui_mode: "hosted"
  };

  console.log("⏳ 正在请求 Stripe 长链接 (US)...");
  try {
    const resp = await fetch(
      "https://chatgpt.com/backend-api/payments/checkout",
      {
        method: "POST",
        headers: {
          Authorization: `Bearer ${accessToken}`,
          "Content-Type": "application/json"
        },
        body: JSON.stringify(payload)
      }
    );
    const data = await resp.json();

    if (!resp.ok) {
      console.error(`❌ 请求失败 HTTP ${resp.status}`);
      console.log("📋 响应详情:", data);
      return;
    }

    const hostedUrl = data?.url || data?.stripe_hosted_url || data?.checkout_url;
    if (!hostedUrl) {
      console.warn("⚠️ 未找到长链接,原始响应:", data);
      return;
    }

    console.log("─".repeat(60));
    console.log("✅ ChatGPT Team 链接生成成功!(美国)");
    console.log("📋 Checkout Session ID :", data.checkout_session_id);
    console.log("📌 计划                : ChatGPT Team (US/USD)");
    console.log("💺 席位                :", payload.team_plan_data.seat_quantity);
    console.log("🎟️  优惠码              :", COUPON);
    console.log("🔗 Stripe 长链接:");
    console.log(hostedUrl);
    console.log("─".repeat(60));
  } catch (e) {
    console.error("❌ 网络异常:", e.message);
  }
})();

4 个帖子 - 2 位参与者

阅读完整话题

来源: LinuxDo 最新话题查看原文