From cf84caecc8144a31404628a43abf4dff185a952e Mon Sep 17 00:00:00 2001 From: yurii Date: Mon, 16 Nov 2026 14:34:05 +0000 Subject: [PATCH] docs(payment): update CreditCall progress streaming behavior --- cmd/hardlink/main.go | 2 +- docs/payment-api.md | 34 +++++++++++-------------- internal/handlers/creditcall_preauth.go | 1 + internal/handlers/payment_handlers.go | 1 + release notes.md | 3 +++ 5 files changed, 21 insertions(+), 20 deletions(-) diff --git a/cmd/hardlink/main.go b/cmd/hardlink/main.go index 9aa0f85..e0f62fd 100644 --- a/cmd/hardlink/main.go +++ b/cmd/hardlink/main.go @@ -33,7 +33,7 @@ import ( ) const ( - buildVersion = "v2.2.4" + buildVersion = "v2.2.5" serviceName = "hardlink" pollingFrequency = 8 * time.Second ) diff --git a/docs/payment-api.md b/docs/payment-api.md index 87c0cad..4cd9648 100644 --- a/docs/payment-api.md +++ b/docs/payment-api.md @@ -117,31 +117,27 @@ SALE confirmation continues through the existing, separate XML endpoint. for progress delivery. No additional delivery timer or whole-operation deadline shortens the existing HTTP call bounds. - Native SDK 3.17 updates use `UPDATE`; card notifications use `NOTIFICATION`, - retained as `CARD_STATUS` on the internal wire. Normal progress does not require - a reference: it is accepted only inside the existing serial transaction's active - observational window. A supplied nonempty reference must match. The window opens - immediately before the SDK start call and closes immediately at - `TransactionFinished`; finalization never waits for card removal. + retained as `CARD_STATUS` on the internal wire. Supported progress is forwarded + directly to the active stream, regardless of its reference. The request registers + its listener around the existing transaction execution and removes it in `finally` + before queuing the final frame. Finalization never waits for card removal. - `CardRemovalRequested` and `CardRemovalEnforced` follow the same active-window - rule as other progress, including when no reference is supplied. Real Miura + rule as other progress, regardless of the supplied reference. Real Miura insertion-recovery sequences can repeat present-card and remove-card prompts within one transaction; these repeated prompts are not deduplicated. Outside the active window they are discarded. `Removed` remains omitted even with a reference, and the existing `Inserted` mapping is unchanged. - Ownership is best-effort UI observation. SDK 3.17 does not establish that every - queued reference-less callback, including removal, has drained before another transaction - starts. Such a callback may briefly display stale progress in a later active - window. This accepted limitation must never affect success, decline, cancellation, - timeout outcomes, confirmation, retry, receipts, PMS posting, or business state. -- After timeout, an ambiguous start error, an asynchronous SDK error during an - active window, or reference reuse/overlap, progress remains suppressed for that - `Client` lifetime across SALE and PREAUTH. New transactions, elapsed time, callbacks and automatic - reconnect do not reset the guard. Payments remain enabled. -- Only the exact synchronous `ClientNotConnectedToServer` error safely clears an - unsuppressed window and releases its unused reference: SDK 3.17 `StartCommand` - returns it before `SendRequest`. Validation errors, mixed errors and all other - unproven errors suppress observation. Safe pre-dispatch rejection never clears - an existing suppression latch. + queued callback, including removal, has drained before another transaction starts. + References are not used to correlate progress. A late callback may briefly display + stale progress in a later active stream. This accepted limitation must never affect + success, decline, cancellation, timeout outcomes, confirmation, retry, receipts, + PMS posting, or business state. +- Every stream request creates a fresh writer and empty bounded progress queue. + Timeout and exception cleanup removes only that request's listener; SDK errors + and repeated references do not disable progress for later SALE or PREAUTH requests. + The Client-wide SDK subscriptions remain unchanged. Slow or disconnected consumers + cannot block SDK callbacks on socket I/O; a full queue may drop progress hints. - Progress cannot approve, decline, confirm, cancel, or retry a transaction. `OnlineAuthCompleted` means waiting; `Removed` and unknown events are omitted. diff --git a/internal/handlers/creditcall_preauth.go b/internal/handlers/creditcall_preauth.go index 3c4218f..0a119eb 100644 --- a/internal/handlers/creditcall_preauth.go +++ b/internal/handlers/creditcall_preauth.go @@ -12,6 +12,7 @@ import ( ) func (app *App) preauthPayment(w http.ResponseWriter, r *http.Request) { + log.Printf("preauthPayment called") app.streamPayment(w, r, true) } diff --git a/internal/handlers/payment_handlers.go b/internal/handlers/payment_handlers.go index 3c5ef37..7722339 100644 --- a/internal/handlers/payment_handlers.go +++ b/internal/handlers/payment_handlers.go @@ -16,6 +16,7 @@ import ( ) func (app *App) salePayment(w http.ResponseWriter, r *http.Request) { + log.Printf("salePayment called") app.streamPayment(w, r, false) } diff --git a/release notes.md b/release notes.md index 9a702b6..86c682f 100644 --- a/release notes.md +++ b/release notes.md @@ -2,6 +2,9 @@ `buildVersion` is a const in `cmd/hardlink/main.go`. +#### v2.2.5 - 16 November 2026 +docs(payment): update CreditCall progress streaming behavior + #### v2.2.4 - 05 November 2026 fix(creditcall): require fresh confirmation approval for sale