update
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 46s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m25s

This commit is contained in:
matst80
2025-12-04 14:19:00 +01:00
parent fbc773dbca
commit 0ef29596c1
9 changed files with 351 additions and 102 deletions

View File

@@ -120,6 +120,7 @@ func (s *CheckoutPoolServer) KlarnaValidationHandler(w http.ResponseWriter, r *h
err := json.NewDecoder(r.Body).Decode(order)
if err != nil {
w.WriteHeader(http.StatusBadRequest)
return
}
logger.InfoContext(r.Context(), "Klarna order validation received", "order_id", order.ID, "cart_id", order.MerchantReference1)
grain, err := s.getGrainFromKlarnaOrder(r.Context(), order)
@@ -146,6 +147,7 @@ func (s *CheckoutPoolServer) KlarnaNotificationHandler(w http.ResponseWriter, r
err := json.NewDecoder(r.Body).Decode(order)
if err != nil {
w.WriteHeader(http.StatusBadRequest)
return
}
log.Printf("Klarna order notification: %s", order.ID)
logger.InfoContext(r.Context(), "Klarna order notification received", "order_id", order.ID)