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
|
|
@ -157,11 +157,17 @@ int main(int argc, char** argv) {
|
|||
srv.BodyHas(path, "Catcrafts E2E", "the beneficiary name is shown");
|
||||
srv.BodyHas(path, kBic, "the BIC is shown when one is configured");
|
||||
srv.BodyHas(path, order.reference, "the short reference is shown");
|
||||
// The structured form is what a payer's own bank check-digit-validates,
|
||||
// so its absence would quietly remove the protection that makes
|
||||
// unattended matching safe.
|
||||
srv.BodyHas(path, "RF", "the structured ISO 11649 reference is shown");
|
||||
srv.BodyHas(path, "€12.50", "the exact amount to transfer");
|
||||
// The payto link is a second copy of the same instructions, filled
|
||||
// into the payer's app unread, so every field in it must be the one
|
||||
// the manual details print. The message must be exactly the reference
|
||||
// the matcher looks for, and the name must survive percent-encoding:
|
||||
// the test name's space and comma are there to prove that.
|
||||
srv.BodyHas(path,
|
||||
std::format("href=\"payto://iban/{}?amount=EUR:12.50"
|
||||
"&receiver-name=Catcrafts%20E2E%2C%20not%20a%20real%20account"
|
||||
"&message={}\"", kIban, order.reference),
|
||||
"a payto link carries the same IBAN, amount, name and reference");
|
||||
// No hosted checkout exists, so nothing may invite the buyer to leave.
|
||||
srv.BodyLacks(path, "Resume payment",
|
||||
"a self-hosted rail offers no hosted checkout button");
|
||||
|
|
|
|||
Loading…
Reference in a new issue