Commit History

  1. Corrija a integração com mercado pago - Follow Up Deployment

    Verified signature
    a8de9e8
  2. Agora antes dos dados pessoais vamos colocar uma sessao com um formulario de consulta via API usando os numeros do CPF com validação e Mascara. O formulario deve pedir o CPF, quando digitado se estiver incorreto abrir uma modal informando CPF Falso, Invalído ou Politicamente Exposto. Se o CPF for valido use os dados da API para em um efeito de carregamento buscar os dados da API na URL https://dadospublicos.blog/consulta?token=meu_token_secreto&cpf={CPF} que retorna o json da seguinte forma {"mensagem":"O CPF 08609953998 pertence a Alex XXXXXXXX XXXX, sexo M - Masculino e tem 33 anos de idade."}. o botao acessar no cabeçalho, deve rolar para o formulario de consulta na API - Follow Up Deployment

    Verified signature
    0807e9d
  3. Incoreto, '').replace(',', '.')); total += price; }); // Update totals in both places document.querySelectorAll('.total-price').forEach(el => { el.textContent = `R${total.toFixed(2).replace('.', ',')}`; }); return total; } // Modal handling const modal = document.getElementById('checkoutModal'); const openBtn = document.getElementById('open-checkout'); const closeBtn = document.querySelector('.modal-close'); openBtn.addEventListener('click', () => { modal.style.display = 'block'; document.body.style.overflow = 'hidden'; }); closeBtn.addEventListener('click', () => { modal.style.display = 'none'; document.body.style.overflow = 'auto'; }); window.addEventListener('click', (e) => { if (e.target === modal) { modal.style.display = 'none'; document.body.style.overflow = 'auto'; } }); // Handle checkbox changes document.querySelectorAll('input[type="checkbox"]').forEach(checkbox => { checkbox.addEventListener('change', calculateTotal); }); // Checkout form handler document.getElementById('checkout-form').addEventListener('submit', async (e) => { e.preventDefault(); const formData = new FormData(e.target); const customerData = { name: formData.get('name'), email: formData.get('email'), phone: formData.get('phone') }; const total = calculateTotal(); try { // Show loading state document.getElementById('checkout-button').disabled = true; document.getElementById('checkout-button').innerHTML = ' Processando...'; // Create preference with Mercado Pago const response = await fetch('/create-preference', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ customer: customerData, amount: total, items: Array.from(document.querySelectorAll('input[type="checkbox"]:checked')).map(checkbox => { return { title: checkbox.closest('.service-option').querySelector('h3').textContent, price: parseFloat(checkbox.closest('.service-option').querySelector('span').textContent.replace('+R , '').replace(',', '.')) }; }) }) }); const preference = await response.json(); // Open PIX checkout mp.checkout({ preference: { id: preference.id }, render: { container: '.checkout-container', label: 'Pagar com PIX', type: 'wallet' } }); // Show success UX document.querySelector('.checkout-container').innerHTML = ` - Follow Up Deployment

    Verified signature
    ab20504
  4. initial commit

    Verified signature
    1aa336c