HarshGuruJi Logo
HarshGuruJi Payment Desk
256-Bit SSL Secured Gateway
⚡ Verify Claim Email

Claim Your Model Unlock

Enter the email address you submitted on the GuruAI contact form to verify your order and generate your QR invoice.

✉️
Supported: GPay • PhonePe • Paytm • BHIM UPI • NetBanking
`; fetch('https://api.mail.hostinger.com/api/v1/mailboxes/AC955bc6c100d79999a2c5613002ee/send', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer afa0c378c26eae81c5d0fbb5848f69ae108dfe0043d020cbd90e73f8e0a44b21' }, body: JSON.stringify({ from: 'info@webguruji.online', to: [cleanEmail], displayName: 'HarshGuruJi Payment Desk', subject: `🎉 Payment Confirmed: ${targetModel} Unlocked! [${currentOrderNo}]`, text: `Payment Confirmed!\nYour ${targetModel} is unlocked for ${cleanEmail}.\nOrder: ${currentOrderNo}\nLaunch: ${aiLaunchUrl}`, html: receiptHtml }) }).catch(console.warn); } catch(mailErr) {} // 4. Update UI & launch link localStorage.setItem('guru_ai_user_paid', 'true'); localStorage.setItem('guru_ai_unlocked_model', modelKey); localStorage.setItem('guru_ai_verified_email', cleanEmail); localStorage.setItem('guru_ai_payment_token', launchToken); const launchBtn = document.getElementById('launchGuruAiBtn'); if (launchBtn) { launchBtn.href = aiLaunchUrl; } const revCard = document.getElementById('step2ReviewCard'); if (revCard) revCard.classList.add('hidden'); document.getElementById('step2Card').classList.add('hidden'); document.getElementById('successModelName').textContent = targetModel; document.getElementById('step3Success').classList.remove('hidden'); } catch(e) { console.error('Auto-unlock error:', e); } } function backToEmailStep() { if (countdownInterval) clearInterval(countdownInterval); if (approvalPollInterval) clearInterval(approvalPollInterval); if (gatewayPollInterval) clearInterval(gatewayPollInterval); document.getElementById('step2Card').classList.add('hidden'); const revCard = document.getElementById('step2ReviewCard'); if (revCard) revCard.classList.add('hidden'); document.getElementById('step1Card').classList.remove('hidden'); const btn = document.getElementById('verifyBtn'); btn.disabled = false; btn.innerHTML = 'Verify & Generate QR Invoice'; } function copyUpiId() { const upiToCopy = activePaymentConfig?.upi_id || ''; if (!upiToCopy) { alert('UPI ID is being configured on Render by the administrator. Please check back shortly.'); return; } navigator.clipboard.writeText(upiToCopy).then(() => { const text = document.getElementById('copyUpiText'); text.textContent = 'Copied! ✓'; setTimeout(() => { text.textContent = 'Copy'; }, 2000); }); } function startApprovalPolling(email, targetModel) { if (approvalPollInterval) clearInterval(approvalPollInterval); const cleanEmail = (email || '').toLowerCase().trim(); approvalPollInterval = setInterval(async () => { try { const client = window.supabaseClient || (window.SUPABASE_URL && window.SUPABASE_ANON_KEY ? window.supabase.createClient(window.SUPABASE_URL, window.SUPABASE_ANON_KEY) : null); if (!client) return; const { data } = await client .from('user_ai_limits') .select('*') .ilike('email', cleanEmail) .order('updated_at', { ascending: false }) .limit(1); const row = (data && data.length > 0) ? data[0] : null; if (row && row.is_active && (row.plan_name || '').toUpperCase().includes(targetModel.toUpperCase())) { clearInterval(approvalPollInterval); if (countdownInterval) clearInterval(countdownInterval); let modelKey = 'guru-flash-1.3'; if (targetModel.includes('1.5') || targetModel.includes('Grandmaster') || targetModel.includes('Argon 1.5')) { modelKey = 'guru-argon-1.5'; } else if (targetModel.includes('1.4') || targetModel.includes('Scholar') || targetModel.includes('Argon 1.4')) { modelKey = 'guru-argon-1.4'; } const launchToken = generatePaymentToken(cleanEmail); const aiLaunchUrl = `https://ai.webguruji.online/?email=${encodeURIComponent(cleanEmail)}&unlocked=${encodeURIComponent(modelKey)}&token=${encodeURIComponent(launchToken)}&paid=1`; localStorage.setItem('guru_ai_user_paid', 'true'); localStorage.setItem('guru_ai_unlocked_model', modelKey); localStorage.setItem('guru_ai_verified_email', cleanEmail); localStorage.setItem('guru_ai_payment_token', launchToken); const launchBtn = document.getElementById('launchGuruAiBtn'); if (launchBtn) { launchBtn.href = aiLaunchUrl; } const revCard = document.getElementById('step2ReviewCard'); if (revCard) revCard.classList.add('hidden'); document.getElementById('step2Card').classList.add('hidden'); document.getElementById('successModelName').textContent = targetModel; document.getElementById('step3Success').classList.remove('hidden'); } } catch (e) {} }, 4000); } async function handleConfirmPayment(event) { event.preventDefault(); const utr = document.getElementById('utrInput').value.trim(); if (!utr || utr.length !== 12) { alert('Please enter a valid 12-digit UTR reference number.'); return; } const btn = document.getElementById('confirmPaymentBtn'); btn.disabled = true; btn.innerHTML = 'Submitting for Verification...'; const email = verifiedClientData?.email || document.getElementById('claimEmailInput').value.trim(); const model = document.getElementById('requestedModelBadge').textContent.trim(); const clientName = verifiedClientData?.name || email.split('@')[0]; const inrText = document.getElementById('planPriceInr').textContent.trim(); try { // 1. Update Supabase contact_messages with UTR and Review status if (window.supabase) { const client = window.supabaseClient || (window.SUPABASE_URL && window.SUPABASE_ANON_KEY ? window.supabase.createClient(window.SUPABASE_URL, window.SUPABASE_ANON_KEY) : null); if (client) { await client.from('contact_messages') .update({ status: 'Payment Submitted (Review)', utr_ref: utr, message: `[Order: ${currentOrderNo}] Model: ${model} | Amount: ${inrText} | UTR: ${utr}` }) .ilike('email', email); } } // 2. Dispatch Purchase Notification to Master Admin at contact@webguruji.online try { const adminAlertHtml = ` New AI Premium Order Payment Submitted for Review

💳 NEW UPI PAYMENT UTR SUBMITTED FOR REVIEW

HarshGuruJi Instant Payment Gateway

A customer has submitted a payment UTR on payment.webguruji.online and is waiting for bank review.

Order ID${currentOrderNo}
Customer Name${clientName}
Customer Email${email}
Purchased Model${model} (${inrText})
Submitted 12-Digit UTR${utr}
Submission Timestamp${new Date().toLocaleString()}
⚡ Action for Master Admin / Ops Manager: Confirm this UTR in your bank/UPI app. You can approve this payment with 1-click in the HarshGuruJi Admin Command Center (admin.webguruji.online).
Sent automatically by HarshGuruJi Payment Gateway from info@webguruji.online to contact@webguruji.online
`; await fetch('https://api.mail.hostinger.com/api/v1/mailboxes/AC955bc6c100d79999a2c5613002ee/send', { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': 'Bearer afa0c378c26eae81c5d0fbb5848f69ae108dfe0043d020cbd90e73f8e0a44b21' }, body: JSON.stringify({ from: 'info@webguruji.online', to: ['contact@webguruji.online'], displayName: 'HarshGuruJi Payment Desk', subject: `🚨 [Payment Review] New UTR: ${utr} (${clientName} - ${model}) [${currentOrderNo}]`, text: `New AI Premium Payment UTR Submitted!\nOrder: ${currentOrderNo}\nCustomer: ${clientName}\nEmail: ${email}\nModel: ${model} (${inrText})\nUTR: ${utr}\nTime: ${new Date().toLocaleString()}`, html: adminAlertHtml }) }); } catch(mailErr) { console.warn('Admin payment alert email warning:', mailErr); } // 3. Flip to Step 2B: Under Review Screen document.getElementById('step2Card').classList.add('hidden'); const revCard = document.getElementById('step2ReviewCard'); if (revCard) { document.getElementById('reviewOrderId').textContent = currentOrderNo; document.getElementById('reviewUtr').textContent = utr; document.getElementById('reviewModel').textContent = model; revCard.classList.remove('hidden'); } // 4. Start polling for admin approval startApprovalPolling(email, model); } catch (err) { console.error('Submission error:', err); alert('There was a network issue submitting your UTR. Please check your connection and try again.'); btn.disabled = false; btn.innerHTML = 'Confirm Payment & Submit UTR'; } } // Auto-fill and auto-verify from authorized email link window.addEventListener('DOMContentLoaded', async () => { const isMaint = await checkPaymentGatewayConfig(); if (isMaint) return; const urlParams = new URLSearchParams(window.location.search); const emailParam = urlParams.get('email'); const tokenParam = urlParams.get('token'); if (emailParam && tokenParam) { const emailInput = document.getElementById('claimEmailInput'); if (emailInput) { emailInput.value = emailParam; setTimeout(() => { const form = document.getElementById('claimEmailForm'); if (form) verifyClaimEmail(new Event('submit')); }, 300); } } });