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:
parent
33ce8f45d8
commit
dead3ed0cc
7 changed files with 84 additions and 38 deletions
|
|
@ -84,6 +84,11 @@ int main() {
|
|||
CheckEq(Url("href", "ethereum:0xAbC@8453/transfer?address=0xDeF&uint256=1000000"),
|
||||
" href=\"ethereum:0xAbC@8453/transfer?address=0xDeF&uint256=1000000\"",
|
||||
"url: ethereum: EIP-681 kept verbatim, ampersand escaped");
|
||||
// The bank rail's counterpart: an RFC 8905 payto link. Same two rules,
|
||||
// and the percent-encoded name must come through untouched.
|
||||
CheckEq(Url("href", "payto://iban/NL00TEST0123456789?amount=EUR:12.50&receiver-name=A%20B&message=CC-ABCDEF"),
|
||||
" href=\"payto://iban/NL00TEST0123456789?amount=EUR:12.50&receiver-name=A%20B&message=CC-ABCDEF\"",
|
||||
"url: payto: RFC 8905 kept verbatim, ampersand escaped");
|
||||
// Empty href fails every allowlist branch — including the site-relative
|
||||
// one, which needs at least one character — so it lands on "#" rather
|
||||
// than emitting a link that resolves to the current page.
|
||||
|
|
|
|||
Loading…
Reference in a new issue