UNICOM WHATSAPP - PHASE 3 CONTROLLED LIVE TEST

WHAT THIS DOES
- Preserves existing api_invoice.php, API keys, shop dashboard and wallet behavior.
- Adds a manual 'Send test' button to queue.php for UNICOM and the one allowlisted test recipient.
- Sends the previously approved 'unicom_test' template (no invoice details).
- Does NOT deduct wallet credit or automatically send queued invoices.
- 'accepted_test' means Meta accepted the API request, NOT confirmed delivery.

INSTALL
1. BACK UP your current public_html/wa_admin folder and MySQL database.
2. In phpMyAdmin, select the wa_admin database and run phase3.sql once.
3. Upload send_test.php and the updated queue.php into public_html/wa_admin.
   Do not replace other working PHP files; the ZIP contains the original files only for reference.
4. Copy meta_test_config.example.php to meta_test_config.php on the server.
5. Edit meta_test_config.php on the server: supply the valid Meta access token for the UNICOM production number.
   Keep the token secret. Do not send it to ChatGPT or put it in screenshots.
6. Verify phone_number_id 1494501707074841 is still correct in Meta WhatsApp Manager.
7. Ensure your 'unicom_test' template is approved and its language code is 'en'.
8. Use the existing VFP command to queue an invoice to 9613215656:
   DO UNICOM_WA_CLIENT WITH '10526','9613215656','Mohammad','14/11/2026','125.00'
9. Open https://unicomlb.com/wa_admin/queue.php and press Send test on that row.
10. Check recipient WhatsApp and Meta delivery status. The queue shows accepted_test only for accepted API calls.

SECURITY
- The existing queue API is unchanged and stays queue-only.
- Manual send requires logged-in admin session and CSRF token.
- Only UNICOM and the allowlisted phone number are permitted.
- The sender token is server-side and never returned to the browser.
- Do not use a template that requires variables with this version.
- No webhook delivery receipts, retry worker, or real invoice template is included yet.
- On production hosting, prevent direct public access to meta_test_config.php (PHP execution is required).
- If your hosting uses an older PHP version, PHP 8.1+ is recommended.

ROLLBACK
- Restore the original queue.php, delete send_test.php and meta_test_config.php.
- You may leave the new enum value in the database; it does not change existing API behavior.
