# Features — Paymyfines-CronJob

Evidence date: 2026-10-07.

Source: `git@bitbucket.org:overdrive/paymyfines-cronjob.git`, `master` at `cbc8461` (2021-10-18).

There is no feature list in the source repository. The table is recovered from code. "Current" means the behaviour is in that commit. Nothing in git is marked planned, in development, or removed.

## Current

| Feature | Behaviour | Evidence |
|---|---|---|
| HTTP settlement run | `GET /CronJob` runs pass 1 (already `Source Failed Payment`) then pass 2 (`transaction.intPaid = 'YES'`). Returns 200 `Cronjob completed` | `Controllers/CronJobController.cs` |
| Classify source `IFORCE` | Upper-cased `strInfringementSource` of `IFORCE` goes to the loader's first list and gets `TransactionId`. Every other source goes to the second list with `TransactionId` left at 0 | `Services/PaymentService.cs` `LoadInfringements` |
| Reversed list hand-off | The controller passes `(eNatis list, iForce list)` into `(iForce parameter, eNatis parameter)`, then posts the iForce-named list to iForce and the eNaTIS-named list to eNaTIS | `CronJobController.Get` |
| eNaTIS payment post | JSON `infringementNoticeNumber`, `amount` to `POST infringement/payinfringement` | `ProcessENatisPayments`, `Model/PayEnatisInfringement.cs` |
| iForce payment post | JSON with `freshFine: true`, authority, notice, amount, date, provider name, `terminalId: 0`, receipt, to `POST IForce/registerpayment` | `ProcessIForcePayments`, `Model/PayIForceInfringement.cs` |
| Approve on HTTP 200 | `transaction.intPaid = 'SETTLED'`, `dtLastEdit = NOW()`, infringement `Source Approved Payment` and a `strSourceResponse` summary | Success branch of each `Process*` method |
| Fail a new payment | `intSettlementTries = 1`, infringement `Source Failed Payment`, error text in `strSourceResponse`. Transaction `strStatus` set to `Source Failed Payment` (eNaTIS also sets `dtLastEdit`; iForce does not) | Single-list `Process*` methods |
| Retry a source failure | Increment `intSettlementTries`. iForce also rewrites both statuses. eNaTIS retry writes the try count and `strSourceResponse` only | Two-list `Process*` methods |
| Problem mail after more than 3 tries | Plain-text mail, subject `PMF Error Payments`, when the incremented count is greater than 3 | `MailService.SendEmail`. Reached only if the admin-query block does not throw. See `prd.md` WF-1 |
| Accept any TLS certificate | Callback returns true | `Helper/Helper.cs` |
| Developer launch into the job | IIS Express and Kestrel profiles open `CronJob` in the browser | `Properties/launchSettings.json` |

## Present but not on the request path

| Feature | Evidence | Note |
|---|---|---|
| Dependency-injected `MySqlConnection` | `Startup.ConfigureServices` | `CronJobController` opens a different connection from a new configuration builder |
| Injected `ILogger` | `CronJobController` constructor | No log call. `WriteLog` lines are comments |
| `appsettings.Development.json` | Logging levels only | The controller's connection string does not load this file |
| HTTPS redirection | `Startup.Configure` | No certificate or public URL is configured in the repo |
| Authorization middleware | `app.UseAuthorization()` | No authentication scheme is registered |

## Not in this repository

| Expected by the name or by a later Pay My Fines tree | Evidence of absence |
|---|---|
| Timer, cron expression, Windows task, or `IHostedService` | No match under `TMTCronJob/` |
| Queue, Lambda, or Serverless schedule | No template. `pmf-backend-ah` documents a schedule in a different repository |
| Login, API key, or IAM authorizer | `Startup.cs`, `launchSettings.json` |
| Tests | No test project in `TMTCronJob.sln` |
| README, pipeline, Docker, infrastructure-as-code | Not in `cbc8461` |
| Writing `transaction.intPaid = 'YES'` | Only selected, never updated to `YES` |
| Writing `infringement.intPaid` | Column not used |
| Sonar scanner project file | `sonar-project.properties` and `sonarqube_scan.bat` are not in git. The onboarding issue listed them on the scan host |

## Planned, in development, changed, removed

No branch, comment, or commit marks a feature as planned or in progress.

Commented `WriteLog` calls are **Implemented** as comments. They are not an active logging feature.

Git history has no earlier version of these files. There is no removed feature to record inside this repository.

The similar job documented for `pmf-backend-ah` (2022-05-06) differs in routing, filters, `SETTLED`, `freshFine`, and the mail recipient. That is another repository's record, not a changelog for this one. See `prd.md`.

## Recently changed

The only application commit is `cbc8461` on 2021-10-18 ("Add project files."). No later commit exists on `origin/master`.
