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
|
|
@ -326,14 +326,9 @@ HTTPResponse RenderPage(std::string_view target) {
|
|||
pay.address = instr->address;
|
||||
pay.amount = instr->amount;
|
||||
// Set only by bank-transfer rails, and what the renderer
|
||||
// switches on. The structured reference is derived from the
|
||||
// order token rather than carried by the rail, so the two
|
||||
// forms the page prints cannot disagree with each other.
|
||||
// switches on.
|
||||
pay.beneficiary = instr->beneficiary;
|
||||
pay.bic = instr->bic;
|
||||
if (!instr->beneficiary.empty()) {
|
||||
pay.structuredReference = CreditorReferenceFromToken(order->token);
|
||||
}
|
||||
const std::int64_t now =
|
||||
std::chrono::duration_cast<std::chrono::seconds>(
|
||||
std::chrono::system_clock::now().time_since_epoch()).count();
|
||||
|
|
|
|||
Loading…
Reference in a new issue