Skip to content

be: read moneta's e-mail from public samples, with account and transaction id nullable - #31

Merged
landsman merged 1 commit into
mainfrom
moneta
Nov 10, 2026
Merged

landsman merged 1 commit into
mainfrom
moneta

Conversation

@landsman

Copy link
Copy Markdown
Owner

Adds MONETA, built on #30. No real MONETA e-mail has been seen: the template follows the sanitised samples in radekhulan/myinvoice (MIT), whose parser real users run. The fixtures are synthetic and say so.

Safe until a real e-mail comes: KEY_FINGERPRINTS is empty, and an empty pin set now refuses every key with "no key is pinned for moneta.cz yet" plus the fingerprint DNS gave, so withDns() treats every MONETA e-mail as Unverified. Pinning that fingerprint, after checking it, is the step left.

What MONETA's e-mail does not carry, and what that changes in the interface:

  • Transaction.account() is nullable, documented as null for MONETA, which masks it (238***891). The merchant has to be known from the inbound address.
  • Transaction.transactionId() is nullable, null for MONETA, which prints none; deduplicate on a signed messageId() (be: hand out the message-id when the bank signs it, for banks with no transaction id #30).
  • The variable symbol is read from Popis, which may hold the payer's text, so two VS: there are refused and the docs say to match on the amount too.
  • No balance (a date, no time), type() GENERAL, only Kč amounts.

NotificationLines.stacked reads a label alone on a line with its value on the next one, through the same duplicate and after-the-message guards as labelled. The tests cover a forged Částka after Popis, two symbols, a heading against the subject, another currency, and the no-pin refusal.

make build: green.

@landsman
landsman added this pull request to stack #32 November 10, 2026 20:13
Base automatically changed from message-id to main November 10, 2026 20:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant