update logentry
This commit is contained in:
3
main.go
3
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)
|
||||
|
||||
Reference in New Issue
Block a user