update logentry

This commit is contained in:
matst80
2025-04-18 18:04:02 +02:00
parent 4cc1851626
commit 86141c565a

View File

@@ -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)