#### pagamento_maos.php #### ]+/i', $link_colado, $urlMatch)) { $url_to_parse = $urlMatch[0]; } if (!empty($url_to_parse)) { $query = parse_url($url_to_parse, PHP_URL_QUERY); parse_str((string)$query, $params); $mac_address = $params['mac'] ?? ''; $telefone = $params['telefone'] ?? ''; $input_val = !empty($telefone) ? $telefone : $mac_address; } else { $input_val = $link_colado; } $input_val = strtoupper(trim($input_val)); if (empty($input_val)) { $msg_erro = 'Entrada inválida. Não foi possível extrair MAC ou telefone.'; } else { $configPath = __DIR__ . '/api/renovar/config.json'; $config = file_exists($configPath) ? json_decode(file_get_contents($configPath), true) : []; $whatsFile = __DIR__ . '/whats.json'; $whatsData = file_exists($whatsFile) ? json_decode(file_get_contents($whatsFile), true) : []; if (!is_array($whatsData)) $whatsData = []; $clean_input = preg_replace('/[^0-9]/', '', $input_val); $input_phone_core = normalizePhoneCore($input_val); // Prepara variações de MAC caso tenha digitado sem dois-pontos $mac_variations = [$input_val]; $clean_mac = preg_replace('/[^A-Z0-9]/', '', $input_val); if (strlen($clean_mac) === 12 && preg_match('/^[A-F0-9]{12}$/', $clean_mac)) { $mac_variations[] = implode(':', str_split($clean_mac, 2)); } $is_multimac = false; $multimac_m = null; #### mercado_pago.php ####