Please wait
We are processing your request.
[wpdatatable id=1]
jQuery(document).ready(function ($) { console.log('Processing page watcher started'); const params = new URLSearchParams(window.location.search); const requestId = params.get('request_id'); if (!requestId) { console.error('No request_id found in URL'); return; } console.log('Looking for request_id:', requestId); const tableSelector = '#table_1'; if (!$(tableSelector).length) { console.error('wpDataTable not found:', tableSelector); return; } const table = $(tableSelector).DataTable(); const rows = table.rows().data().toArray(); const lastTenRows = rows.slice(-10); console.log('Last 10 rows:', lastTenRows); for (const row of lastTenRows) { console.log('Checking row:', row); let rowRequestId; let paymentLink; if (Array.isArray(row)) { // CHANGE THESE COLUMN NUMBERS rowRequestId = row[0]; // request_id column paymentLink = row[row.length - 1]; // payment_link last column } else { rowRequestId = row.request_id; paymentLink = row.payment_link; } console.log('Row request_id:', rowRequestId); console.log('Payment link:', paymentLink); if ( rowRequestId === requestId && paymentLink && String(paymentLink).startsWith('http') ) { console.log('Redirecting to:', paymentLink); window.location.href = paymentLink; return; } } console.log('Payment link not ready yet. Reloading soon.'); setTimeout(function () { window.location.reload(); }, 5000); });
Skip to contentPlease wait
We are processing your request.
[wpdatatable id=1]