diff --git a/main.go b/main.go index be14e70..e340b92 100644 --- a/main.go +++ b/main.go @@ -186,12 +186,13 @@ func main() { w.Write([]byte("ok")) }) mux.HandleFunc("/push", func(w http.ResponseWriter, r *http.Request) { - log.Printf("KLARNA PUSH: search %v, body %s", r.URL.Query(), r.Body) + if r.Method != http.MethodPost { w.WriteHeader(http.StatusMethodNotAllowed) return } orderId := r.URL.Query().Get("order_id") + log.Printf("Order confirmation push: %s", orderId) req, err := http.NewRequest("GET", fmt.Sprintf("https://api.playground.klarna.com/checkout/v3/orders/%s", orderId), nil) if err != nil { log.Printf("Error creating request: %v\n", err)