JEVAPOS - SMS ENABLER INSTALLATION

NEW CLIENTS: DIRECT TO THE POS DATABASE

1. On the XAMPP server, install SMS Enabler and the 32-bit MySQL ODBC
   driver. The bundled files are in mpesafiles:
   smsenabler_install.exe and mysql-connector-odbc-5.1.13-win32.msi.
   These supplied installers have not been executed or compatibility-tested
   by this update. Use a properly licensed copy of SMS Enabler.

2. Select the installed modem in SMS Enabler. Open Settings > SMS to
   Database. Tick Save received messages into database. Choose Create
   connection string > MySQL.

3. Open JEVAPOS > Settings > M-Pesa > Modem / SMS Enabler. Copy the
   displayed Server Host, Port, Username and Database Name into SMS
   Enabler. Enter that MySQL account's database password (not a POS login
   password). Keep the password private. Save the connection.
   These host details assume SMS Enabler runs on the same server as XAMPP.
   If SMS Enabler is on another PC, use the MySQL server's reachable LAN
   address and authorized network/database permissions instead.

4. In JEVAPOS select the modem branch and payment SMS sender, and enable
   Modem / SMS Enabler. For modem-only operation, switch STK, C2B and B2C
   off. Save M-Pesa Settings. Enable Require M-Pesa Confirmation in
   System Configuration and grant cashier M-Pesa claim permission.

5. Click Check SMS Inbox, receive a small real payment and click again.
   A new message ID confirms the SMS arrived. Open the selling screen
   and confirm the payment appears. Save a test sale, verify its receipt
   code and verify the same code cannot be claimed twice.

NO MANUAL SQL, NEW TABLE OR EXTRA BATCH FILE IS NEEDED.
The matching clean JEVAPOS database already contains sms_in with the
required columns and defaults. SMS Enabler writes directly to that table.
XAMPP can be on C:, E: or F:; this is a MySQL connection, not a folder link.
Do not point a new client at another client's database.

AUTOMATIC LOADING
The selling screen polls using silent browser requests roughly every
second. Incoming raw messages are processed in small batches. Multiple
cashier screens serialize processing of the same inbox record. No extra
command window, polling batch file or manually scheduled script is needed.
With all POS windows closed, SMS Enabler still writes to MySQL while both
are running; queued messages are processed when the POS checks again.
Configure XAMPP and SMS Enabler startup using their installed setup, then
restart Windows and repeat the real-payment test before handover.
Messages cannot arrive from the modem if SMS Enabler or MySQL is stopped.

EXISTING CLIENTS
Existing separate-database integration is preserved. The M-Pesa page
shows the configured SMS source database rather than silently switching it.
Do not change the existing SMS Enabler connection, database name or import
checkpoint on a working installation. Check SMS Inbox is read-only.
The separate legacy source must contain the existing SMS_IN table and
the configured import checkpoint. New clients do not need this setup.

The Incoming URL is an alternative HTTP method, not required here.
Promotional messages remain in the raw inbox but are not cashier payments.
Claimed receipts remain recorded for reconciliation and cannot be reused.
The check button proves POS-side readability only; only a new real SMS
proves SMS Enabler's driver, modem and database connection work end to end.

OPTIONAL AUTOMATIC PAYMENT SLIPS
In M-Pesa Settings enable Automatically Print New M-Pesa Payments.
Select the existing print station and the exact Windows printer name on
that station's server. The station must be active and serve the modem branch.
Update/reinstall the Windows Print Agent from this version on that server
to enable the dedicated short-paper format for M-Pesa payment jobs.
The same agent can serve normal restaurant printers and the payment printer.
There is no separate visible polling batch file or extra worker to install.
With the agent running, messages are processed even when POS tabs are closed.
Old messages present before enabling auto-print are not printed as a backlog.
The slip has only the business name, payment heading, payer name, code,
amount and payment time; no VAT, items, address or standard receipt footer.
Printer drivers may enforce their own minimum paper length; verify one slip
on the actual printer before handover. A failed acknowledgement after a
physical print can cause a retry; confirm printed output when troubleshooting.
The Print links in cashier payment lists and Sales > M-Pesa Transactions
open the short slip using the browser's printer selection.
Cashier lists are restricted to the current open/scheduled shift or today.
Older receipts remain searchable in Sales > M-Pesa Transactions date filters.
