This repository has been archived on 2026-03-21. You can view files and clone it, but cannot push or open issues or pull requests.
payfrit-biz/kds/debug.html
John Mizerek 98163f3842 Switch all API endpoint references from .cfm to .php
PHP API is now deployed on both dev and biz servers with PHP-FPM.
Admin endpoints (quickTasks, scheduledTasks) remain .cfm as they
haven't been ported yet.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-14 15:21:45 -07:00

51 lines
1.7 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<title>KDS Debug</title>
<style>
body { font-family: monospace; padding: 20px; background: #1a1a1a; color: #fff; }
pre { background: #2a2a2a; padding: 15px; border-radius: 8px; overflow: auto; }
button { padding: 10px 20px; margin: 10px 0; }
</style>
</head>
<body>
<h1>KDS Debug - Raw Data Viewer</h1>
<label>Business ID: <input type="number" id="businessId" value="1" /></label><br>
<label>Service Point ID: <input type="number" id="servicePointId" value="" placeholder="Optional" /></label><br>
<button onclick="fetchData()">Fetch Orders</button>
<h2>Raw Response:</h2>
<pre id="output">Click "Fetch Orders" to load data...</pre>
<script>
async function fetchData() {
const businessId = parseInt(document.getElementById('businessId').value) || 0;
const servicePointId = parseInt(document.getElementById('servicePointId').value) || 0;
try {
const response = await fetch('/biz.payfrit.com/api/orders/listForKDS.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
BusinessID: businessId,
ServicePointID: servicePointId
})
});
const data = await response.json();
document.getElementById('output').textContent = JSON.stringify(data, null, 2);
// Also log to console
console.log('Orders data:', data);
if (data.ORDERS && data.ORDERS.length > 0) {
console.log('First order line items:', data.ORDERS[0].LineItems);
}
} catch (error) {
document.getElementById('output').textContent = 'Error: ' + error.message;
console.error('Fetch error:', error);
}
}
</script>
</body>
</html>