From b864873310ce8f7eec4aa167858cab58adc1fab3 Mon Sep 17 00:00:00 2001 From: Stephen Adamson Date: Sat, 11 Jul 2026 17:35:10 +0100 Subject: [PATCH] fix: include SquarePaymentID in commit-failure log for manual reconciliation --- backend/handlers/payments/handlers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/handlers/payments/handlers.go b/backend/handlers/payments/handlers.go index 9c61a0d..0752132 100644 --- a/backend/handlers/payments/handlers.go +++ b/backend/handlers/payments/handlers.go @@ -1067,7 +1067,8 @@ func CreateBookingPayment(w http.ResponseWriter, r *http.Request) { applyEligibleCampaignsAtPayment(r.Context(), tx, bookingID, userID) if cErr := tx.Commit(r.Context()); cErr != nil { - log.Printf("Failed to commit payment records: %v", cErr) + log.Printf("CRITICAL: Square payment %s (ID=%s) was processed but DB transaction commit failed: %v — manual reconciliation required", + paymentResult.Status, paymentResult.SquarePayID, cErr) http.Error(w, "internal server error", http.StatusInternalServerError) return }