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

Function cancelEfunCard

static/js/payment.js:1923–1943  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1921}
1922
1923async function cancelEfunCard() {
1924 const config = collectEfunConfig();
1925 if (!config.code) {
1926 toast.warning("请先填写 CDK 激活码");
1927 return;
1928 }
1929 const ok = await confirm(`确认销卡 ${config.code} 吗?`, "EFun 销卡");
1930 if (!ok) return;
1931 try {
1932 const data = await callEfunApi("cancel", {
1933 code: config.code,
1934 base_url: config.base_url,
1935 api_key: config.api_key,
1936 });
1937 setEfunResult(data?.data || data);
1938 toast.success("销卡完成");
1939 } catch (error) {
1940 setEfunResult(`销卡失败: ${formatErrorMessage(error)}`, true);
1941 toast.error(`销卡失败: ${formatErrorMessage(error)}`);
1942 }
1943}
1944
1945function updateBindModeSpecificUi(mode) {
1946 const bindMode = mode || getBindMode();

Callers

nothing calls this directly

Calls 8

collectEfunConfigFunction · 0.85
confirmFunction · 0.85
callEfunApiFunction · 0.85
setEfunResultFunction · 0.85
formatErrorMessageFunction · 0.85
warningMethod · 0.80
successMethod · 0.80
errorMethod · 0.80

Tested by

no test coverage detected