Files
AutoDoneTeam/reference/getcheckout.js
dela d146ad9ebd feat: 添加完整的 Telegram Bot 和欧洲账单生成功能
主要更新:
-  新增 Telegram Bot 交互界面
-  新增欧洲账单自动生成功能
- 📦 整理项目结构,部署文件移至 deployment/ 目录
- 📝 完善文档,新增 CHANGELOG 和 Bot 部署指南
- 🔧 统一使用 pyproject.toml 管理依赖(支持 uv)
- 🛡️  增强 .gitignore,防止敏感配置泄露

新增文件:
- tg_bot.py: Telegram Bot 主程序
- generate_billing.py: 独立账单生成工具
- modules/billing.py: 欧洲账单生成模块
- deployment/: Docker、systemd 等部署配置
- docs/: 完整的文档和更新日志

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-11 09:59:13 +08:00

40 lines
1.1 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
javascript: (async function () {
try {
const t = await (await fetch("/api/auth/session")).json();
if (!t.accessToken) {
alert("请先登录ChatGPT");
return;
}
const p = {
plan_name: "chatgptteamplan",
team_plan_data: {
workspace_name: "Sepa",
price_interval: "month",
seat_quantity: 5,
},
billing_details: { country: "DE", currency: "EUR" },
promo_campaign: {
promo_campaign_id: "team-1-month-free",
is_coupon_from_query_param: !0,
},
checkout_ui_mode: "redirect",
};
const r = await fetch("https://chatgpt.com/backend-api/payments/checkout", {
method: "POST",
headers: {
Authorization: "Bearer " + t.accessToken,
"Content-Type": "application/json",
},
body: JSON.stringify(p),
});
const d = await r.json();
if (d.url) {
window.location.href = d.url;
} else {
alert("提取失败:" + (d.detail || JSON.stringify(d)));
}
} catch (e) {
alert("发生错误:" + e);
}
})();