bank: the order page offers a payto link and quotes one reference

The bank-transfer block on the order page now gives two ways to pay.
First a payto link (RFC 8905) that hands the IBAN, the amount, the
account-holder name and the order code to a payment app in one go, then
"Or do a manual transfer" with the same details as before.

The manual details list the order code as the Description and nothing
else. The page used to print the structured RF reference as well, with
a paragraph on which code goes in which field, and that read as two
codes for one payment. Matching never needed the RF form: the matcher
finds the CC- code anywhere in the remittance text, the RF form
included. OrderCryptoPay::structuredReference, which only fed that row,
is gone; CreditorReferenceFromToken stays, with its unit test.

The link is built in the view from the very values the manual details
print, so the two cannot disagree. Url() now lets payto: through, like
ethereum:, and the name is percent-encoded because Url() strips spaces.
ShouldSettleBankTransfers asserts the whole link, including that its
message is the reference the matcher looks for.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Jorijn van der Graaf 2026-11-25 15:33:50 +01:00
commit dead3ed0cc
Signed by: jorijnvdgraaf
GPG key ID: 2937E59CDCC1BCFB
7 changed files with 84 additions and 38 deletions

View file

@ -162,6 +162,9 @@ export SafeHtml Url(std::string_view attrName, std::string_view href) {
// protocol-handler scheme: the browser hands it to a wallet or does
// nothing. No script context is reachable through it.
|| StartsWithNoCase(cleaned, "ethereum:")
// RFC 8905 bank-transfer links on the same page. The same kind of
// scheme: handed to a payment app, or nothing happens.
|| StartsWithNoCase(cleaned, "payto:")
// Site-relative, but NOT protocol-relative ("//evil.example" would
// leave the origin while looking like a path).
|| (cleaned.size() >= 1 && cleaned[0] == '/'