Update: 2026-05-15 17:55:39
This commit is contained in:
@@ -367,7 +367,7 @@ foreach ($invoices as $invIdx => $inv) {
|
|||||||
|
|
||||||
// --- Add Verification QR Code ---
|
// --- Add Verification QR Code ---
|
||||||
try {
|
try {
|
||||||
$verifyUrl = "https://musadaq.intaleqapp.com/v.php?id=" . $inv['id'];
|
$verifyUrl = "https://musadaq.intaleqapp.com/verify?id=" . $inv['id'];
|
||||||
$qrApiUrl = "https://api.qrserver.com/v1/create-qr-code/?size=100x100&data=" . urlencode($verifyUrl);
|
$qrApiUrl = "https://api.qrserver.com/v1/create-qr-code/?size=100x100&data=" . urlencode($verifyUrl);
|
||||||
$qrData = $downloadUrl($qrApiUrl);
|
$qrData = $downloadUrl($qrApiUrl);
|
||||||
if ($qrData) {
|
if ($qrData) {
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ if (file_exists($envFile)) {
|
|||||||
use App\Core\Database;
|
use App\Core\Database;
|
||||||
use App\Core\Encryption;
|
use App\Core\Encryption;
|
||||||
|
|
||||||
|
header_remove("Content-Security-Policy");
|
||||||
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
|
header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
|
||||||
header('Pragma: no-cache');
|
header('Pragma: no-cache');
|
||||||
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
|
header('Expires: Sat, 26 Jul 1997 05:00:00 GMT');
|
||||||
|
|||||||
@@ -3,16 +3,19 @@
|
|||||||
* Simple Router & Entry Point
|
* Simple Router & Entry Point
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// 1. Load Bootstrap
|
||||||
require_once __DIR__ . '/../app/bootstrap/init.php';
|
require_once __DIR__ . '/../app/bootstrap/init.php';
|
||||||
|
|
||||||
// Global Request Logging (non-sensitive)
|
// Public Verification Bypass (Top Priority)
|
||||||
error_log("Incoming Request: " . ($_SERVER['REQUEST_METHOD'] ?? 'GET') . " " . ($_SERVER['REQUEST_URI'] ?? '/'));
|
|
||||||
|
|
||||||
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
$uri = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
|
||||||
$route = $_GET['route'] ?? str_replace('/api/', '', $uri);
|
$route = $_GET['route'] ?? str_replace('/api/', '', $uri);
|
||||||
$route = trim($route, '/');
|
$route = trim($route, '/');
|
||||||
|
|
||||||
error_log("Router: Resolved route '{$route}'");
|
if ($route === 'verify' || $route === 'v.php') {
|
||||||
|
$id = $_GET['id'] ?? null;
|
||||||
|
require_once APP_PATH . '/modules_app/invoices/verify_public.php';
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
// Route map: route => [allowed_method, module_file]
|
// Route map: route => [allowed_method, module_file]
|
||||||
$routes = [
|
$routes = [
|
||||||
|
|||||||
@@ -3039,7 +3039,7 @@
|
|||||||
getQrSrc(inv) {
|
getQrSrc(inv) {
|
||||||
if (!inv) return '';
|
if (!inv) return '';
|
||||||
if (inv.jofotara?.qr_image_uri) return inv.jofotara.qr_image_uri;
|
if (inv.jofotara?.qr_image_uri) return inv.jofotara.qr_image_uri;
|
||||||
const verifyUrl = `https://musadaq.intaleqapp.com/v.php?id=${inv.id}`;
|
const verifyUrl = `https://musadaq.intaleqapp.com/verify?id=${inv.id}`;
|
||||||
const qr = new QRious({ value: verifyUrl, size: 300, level: 'H' });
|
const qr = new QRious({ value: verifyUrl, size: 300, level: 'H' });
|
||||||
return qr.toDataURL();
|
return qr.toDataURL();
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user