fix: include SquarePaymentID in commit-failure log for manual reconciliation
This commit is contained in:
@@ -1067,7 +1067,8 @@ func CreateBookingPayment(w http.ResponseWriter, r *http.Request) {
|
|||||||
applyEligibleCampaignsAtPayment(r.Context(), tx, bookingID, userID)
|
applyEligibleCampaignsAtPayment(r.Context(), tx, bookingID, userID)
|
||||||
|
|
||||||
if cErr := tx.Commit(r.Context()); cErr != nil {
|
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)
|
http.Error(w, "internal server error", http.StatusInternalServerError)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user