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

Function submitLocalAutoBind

static/js/payment.js:2388–2413  ·  view source on GitHub ↗
(task, bindData)

Source from the content-addressed store, hash-verified

2386}
2387
2388async function submitLocalAutoBind(task, bindData) {
2389 const expYear = String(bindData.exp_year || "").replace(/\D/g, "");
2390 const payload = {
2391 browser_timeout_seconds: 220,
2392 post_submit_wait_seconds: 90,
2393 verify_timeout_seconds: 180,
2394 verify_interval_seconds: 10,
2395 headless: false,
2396 card: {
2397 number: String(bindData.card_number || "").replace(/\D/g, ""),
2398 exp_month: String(bindData.exp_month || "").replace(/\D/g, "").padStart(2, "0").slice(0, 2),
2399 exp_year: (expYear.slice(-2) || expYear || "").padStart(2, "0"),
2400 cvc: String(bindData.cvc || "").replace(/\D/g, "").slice(0, 4),
2401 },
2402 profile: {
2403 name: String(bindData.billing_name || "").trim(),
2404 email: String(task?.account_email || "").trim() || undefined,
2405 country: String(bindData.country_code || "US").toUpperCase(),
2406 line1: String(bindData.address_line1 || "").trim(),
2407 city: String(bindData.address_city || "").trim(),
2408 state: String(bindData.address_state || "").trim(),
2409 postal: String(bindData.postal_code || "").trim(),
2410 },
2411 };
2412 return api.post(`/payment/bind-card/tasks/${task.id}/auto-bind-local`, payload);
2413}
2414
2415async function runLocalAutoBindInBackground(task, bindData) {
2416 try {

Callers 1

Calls 1

postMethod · 0.45

Tested by

no test coverage detected