MCPcopy Create free account
hub / github.com/Tron521/codex-console-temp / getCheckoutPayload

Function getCheckoutPayload

static/js/payment.js:2065–2082  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2063}
2064
2065function getCheckoutPayload() {
2066 const accountId = Number(document.getElementById("account-select")?.value || 0);
2067 if (!accountId) {
2068 throw new Error("请先选择账号");
2069 }
2070 const payload = {
2071 account_id: accountId,
2072 plan_type: selectedPlan,
2073 country: (document.getElementById("country-select")?.value || "US").toUpperCase(),
2074 currency: (document.getElementById("currency-display")?.value || "USD").toUpperCase(),
2075 };
2076 if (selectedPlan === "team") {
2077 payload.workspace_name = document.getElementById("workspace-name")?.value || "MyTeam";
2078 payload.seat_quantity = Number(document.getElementById("seat-quantity")?.value || 5) || 5;
2079 payload.price_interval = document.getElementById("price-interval")?.value || "month";
2080 }
2081 return payload;
2082}
2083
2084function showGeneratedLink(data) {
2085 generatedLink = data.link || "";

Callers 2

generateLinkFunction · 0.85
createBindCardTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected