Files
hardlink/docs/configuration.md
T

89 lines
5.6 KiB
Markdown

# Configuration
[Project overview](../README.md) | [Operations](operations.md) | [Payment API](payment-api.md)
## Local service configuration
Example `config.yml` for card issuance and printing:
```yaml
port: 9091
lockType: "assaabloy"
lockservUrl: "http://192.168.4.109:4000"
encoderAddr: "1"
dispensPort: "COM9"
dispensAddr: "15"
printerName: "EPSON TM-T82II Receipt"
logdir: "./logs"
isPayment: false
```
- `lockType` is required: `assaabloy`, `omnitec`, `salto`, `tlj` or `kaba`.
- `cert` supplies the certificate value used by TLJ's GuestCard API.
- `dispensAddr` is the two-character serial device address.
- `printerName` must match an installed Windows printer.
- Payment setup additionally uses `isPayment`, `hotel`, `kiosk`, `cmsurl` and,
when CMS does not select a provider, `paymentProvider` (`creditcall`, `dojo` or
`paybridge` or `trustpayments`). Provider-specific terminal settings are read from CMS.
- SQL configuration uses `dbport`, `dbname`, `dbuser` and `dbpassword`; configure
these for monetary CreditCall PREAUTH persistence and the release task.
- `senderroremails` contains recipients for operational error emails.
- `timeoutSeconds` defaults to `300`, with a 15-second shared worker margin. CreditCall
retains its independent 300-second start/confirmation call bounds.
## Room-ticket layout
Example `TicketLayout.xml`:
```xml
<LayoutOptions>
<LogoPath>C:/Logo/logo.png</LogoPath>
<TopMostText>Welcome to the hotel</TopMostText>
<BeforeRoomNumberText>Your room number is</BeforeRoomNumberText>
<BeforeDirectionsText></BeforeDirectionsText>
<HotelSpecificDetails>Hotel information</HotelSpecificDetails>
<CheckOutTimeText>Check Out Time</CheckOutTimeText>
<RoomMapFolderPath>C:/Logo/Roommaps</RoomMapFolderPath>
</LayoutOptions>
```
## Trust Payments: CMS-only configuration
Hardlink needs its ordinary local device/service configuration, including `isPayment`, `hotel`, `kiosk` and `cmsurl`. **Do not add a `trust:` section.** Existing CMS-first payment-provider selection and the generic local `paymentProvider` fallback are unchanged.
The existing hotel-details request is made once. `ReadHotelDetails` retains the complete `cmstypes.Hotel`; `ReadHotel` keeps the existing reservation-system-only API for callers that need it. The other provider branches receive the same reservation-system values as before.
| Trust value | Existing CMS source |
|---|---|
| Provider | `Hotel.ReservationSystem.PaymentSystem` |
| Gateway | `Hotel.ReservationSystem.PaymentGatewayURL` (`payurl`) |
| Site ID | `Hotel.ReservationSystem.PaymentGatewaySiteIDEPOS` (`paysiteidepos`) |
| Password | `Hotel.ReservationSystem.PaymentGatewayPasswordEPOS` (`paypassepos`) |
| PED | `Hotel.ReservationSystem.PDQs[].Serial` for the existing local kiosk identity (`pdq`) |
| Configured currency | `Hotel.Currency.Code` (`curr.code`); existing CMS currency metadata remains available |
| Signing timezone | `Hotel.ReservationSystem.TimeZone` (`tz`), the same CMS timezone source used by checkinfyne |
Gateway, credentials, a unique nonempty matching PED and a valid explicit CMS timezone are required before dispatch. There is no machine-local timezone fallback. Configuration errors identify the missing field without printing credential values. Existing HTTPS gateway restrictions remain.
`ContractsVerified`, configurable `CurrencyEvidence` and the local Trust configuration type have been removed. `default_currency` and `expected_currency` were audit references, not active settings in this checkout; no aliases or replacements are added. An old unused `trust:` section is ignored by the existing YAML decoder, but is no longer required or read.
### Currency policy: legacy behavior
Per the approved clarification, **Trust currency fields do not determine approval**. Missing, matching or differing provider currency does not create a new rejection, evidence requirement or approval switch. No currency field is added to TRU Link requests. The provider currency field is ignored rather than decoded into a validation gate.
CMS remains the configured hotel/payment currency for bookkeeping and receipt presentation. It does not independently prove terminal settlement currency. Hardlink manufactures no currency evidence. All providers use the unified [modern payment API](payment-api.md); the Fyne client has no Trust adapter or currency/evidence acceptance branch. The runtime service receives currency from the CMS hotel response. Shared money handling, PMS rules and posting validations are unchanged.
### Payment behavior retained
- Unified provider-independent Sale/PREAUTH NDJSON routes and existing Fyne screens.
- One financial POST; at most one read-only `/status` lookup for uncertainty, with the same reference and signing timestamp.
- Existing 300-second financial, 15-second status and 330-second kiosk budgets.
- Existing amount, reference, site/PED/type, approval and uncertainty checks; no automatic financial retry of an uncertain result.
- Existing approved-payment capture, ten-minute fallback, Guestline PostPayment, ZeroPreauth, per-room allocations, Registration and keycard prerequisites.
No Trust intent journal, extra recovery system, automatic cross-restart terminal deduplication or guest check-in resumption is introduced. Lost approvals before kiosk capture remain reception reconciliation work. Actual hotel data, gateway acceptance, settlement currency and physical devices were not tested.
For working-directory requirements, logging, offline verification and deployment,
see [operations](operations.md). Use synthetic credentials in examples; do not
copy hotel credentials into source control or diagnostics.