From 4e2df3f3c32b123d860ef283eeee05df8621516b Mon Sep 17 00:00:00 2001 From: jordi fita mas Date: Wed, 28 Feb 2024 13:42:12 +0100 Subject: [PATCH] =?UTF-8?q?Return=20HTTP=C2=A0200=20instead=20of=20HTTP?= =?UTF-8?q?=C2=A0204=20for=20payment=20notifications?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Redsys are a bunch of … something: they **only** recognize HTTP 200 as success; HTTP 204 apparently is an error for they, and don’t get me started in not understanding what to do with an HTP 301. Let’s just give in, and relax. --- pkg/payment/public.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/payment/public.go b/pkg/payment/public.go index a22dcbe..f671e84 100644 --- a/pkg/payment/public.go +++ b/pkg/payment/public.go @@ -251,7 +251,7 @@ func handleNotification(w http.ResponseWriter, r *http.Request, user *auth.User, _ = sendEmail(r.Context(), conn, payment, company, user.Locale) /* shrug */ default: } - w.WriteHeader(http.StatusNoContent) + w.WriteHeader(http.StatusOK) default: httplib.MethodNotAllowed(w, r, http.MethodPost) }