fix: use cache-busting 'verify_qr' route to bypass Varnish cache caching old 302 redirects

This commit is contained in:
Hamza-Ayed
2026-05-15 21:59:36 +03:00
parent 53284b971a
commit e0dc1712ca
3 changed files with 5 additions and 5 deletions

View File

@@ -358,8 +358,8 @@ foreach ($invoices as $invIdx => $inv) {
// --- Add Clickable Website Link ---
// We'll move the link slightly down or put it in I1 with the QR
$sheet->setCellValue("I" . $invRow, 'musadaq.intaleqapp.com/verify');
$verifyUrl = "https://musadaq.intaleqapp.com/index.php?route=verify&id=" . $inv['id'];
$sheet->setCellValue("I" . $invRow, 'musadaq.intaleqapp.com/verify_qr');
$verifyUrl = "https://musadaq.intaleqapp.com/index.php?route=verify_qr&id=" . $inv['id'];
$sheet->getCell("I" . $invRow)->getHyperlink()->setUrl($verifyUrl);
$sheet->getStyle("I" . $invRow)->applyFromArray([
'font' => ['color' => ['argb' => 'FFFFFFFF'], 'underline' => true, 'size' => 8],
@@ -368,7 +368,7 @@ foreach ($invoices as $invIdx => $inv) {
// --- Add Verification QR Code ---
try {
$verifyUrl = "https://musadaq.intaleqapp.com/index.php?route=verify&id=" . $inv['id'];
$verifyUrl = "https://musadaq.intaleqapp.com/index.php?route=verify_qr&id=" . $inv['id'];
$qrApiUrl = "https://api.qrserver.com/v1/create-qr-code/?size=100x100&data=" . urlencode($verifyUrl);
$qrData = $downloadUrl($qrApiUrl);
if ($qrData) {