bank: run Nostro's callback reader beside ours, as a shadow
All checks were successful
Deploy / build-deploy (push) Successful in 7m33s
All checks were successful
Deploy / build-deploy (push) Successful in 7m33s
ParseBunqCallback is to be replaced by ReadCallback of Nostro.Money (Nostro 1.1.0), so that this repo stops carrying bunq's wire format. That reader is stricter than ours: it wants a time, a counterparty and the account's own IBAN where ours reads four members, and nobody has run it on a callback bunq really sent. Ours has settled real payments since 2026-08. So before anything is swapped, both run. - The handler is untouched and still decides alone. Once it has answered and written its credit, Nostro's reader reads the same body and one line goes to the log: `bank callback shadow: AGREE ...` when the id, the amount and the reference are the same in both readings, and `DIFFER ...` with what parted them otherwise. - The line carries no payment data: no id, amount, name or reference, only whether values match and a few fixed words. A body holds the payer's name and IBAN, and may repeat the secret address. - It is on wherever BUNQ_WEBHOOK_PATH is set, with no setting of its own. - project.cpp takes Nostro with --product=money --banks=bunq, at the commit of its 1.1.0 release: the module alone, which brings no credential and no Crafter.Network, Crafter.DB or OpenSSL of its own. ShouldCompareCallbackReaders pins every verdict, and that none repeats anything a body carried. ShouldReceiveBankCallbacks posts callbacks to the real endpoint: an order settles from one, a payment Nostro's reader refuses is credited all the same, and the server's log holds nothing of what was posted. Built and run in a copy of this tree with crafter-build 6.4.1: the server and the wasm bundle build, and every suite passes but ShouldServePostPages, which fails the same way without this change where the post media is not mirrored. The binary needs the same shared libraries as before. Temporary: once real payments read AGREE the reader takes over, and this goes together with ParseBunqCallback. deploy/README.md says how to read the result. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
parent
e0d3181840
commit
36a635fd48
8 changed files with 906 additions and 5 deletions
|
|
@ -446,6 +446,13 @@ int main(int argc, char** argv) {
|
|||
// is configured.
|
||||
if (const char* v = std::getenv("BUNQ_WEBHOOK_PATH"); v && *v) {
|
||||
Server::ConfigureBunqCallback(transferCreditsPath, v);
|
||||
// The shadow run of Nostro's callback reader beside ours
|
||||
// (temporary, see ShadowCallbackVerdict). It needs no setting of
|
||||
// its own, so the test starts with the deploy that carries it, and
|
||||
// it decides nothing. TRANSFER_IBAN is the account it reports a
|
||||
// payment as being on or not on.
|
||||
const char* iban = std::getenv("TRANSFER_IBAN");
|
||||
Server::ConfigureCallbackShadow(iban ? iban : "");
|
||||
}
|
||||
|
||||
// Invoice signing: the GPG key uid/fingerprint; GNUPGHOME decides the
|
||||
|
|
|
|||
Loading…
Reference in a new issue