Reported Issue
When generating QR codes sequentially for different debtors/contracts, the displayed Ref1 and Ref2 values appear correct. However, when the QR code is scanned and payment is made, the system references the previous QR code's data — causing payments to be recorded against the wrong debtor/contract.
Payments recorded to wrong debtor account
Incorrect contract linkage for payment records
Disrupts reconciliation — requires manual correction
Risk to customer trust — QR planned as primary payment channel
Stack: Plain PHP (no framework) • picqer/php-barcode-generator • phpqrcode library • Apache • No database
$filename = $tempDir . 'qrcode.png';
Single shared QR file: Every generation overwrites temp/qrcode.png — race condition between users
No session isolation: No user sessions, no per-request unique identifiers
No database: Entirely stateless, file-based output
Security gaps: display_errors enabled in production, no input validation, no CSRF
Previous workaround: .htaccess disables caching (confirms known issue was recognized)
$barcodeValue = "|{$Position_A}\n{$Position_B}\n{$Position_C}\n{$Position_D}";
URL: https://pam-barcode-gen.workflowdeep.com (Staging)
Server: 157.85.xxx.xxx — Ubuntu 24.04, Nginx, Node 20
Stack: React 19 + Vite + Tailwind (static build)
SSL: Let's Encrypt (Certbot auto-renewal)