From c61fe1bb7b5c050089d1a36ec7f0bdab3c0cfda0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mats=20T=C3=B6rnberg?= Date: Wed, 3 Dec 2025 22:38:14 +0100 Subject: [PATCH] update payment on completed --- cmd/checkout/klarna-handlers.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cmd/checkout/klarna-handlers.go b/cmd/checkout/klarna-handlers.go index 3e6aec8..4c0d5f0 100644 --- a/cmd/checkout/klarna-handlers.go +++ b/cmd/checkout/klarna-handlers.go @@ -193,6 +193,14 @@ func (s *CheckoutPoolServer) KlarnaPushHandler(w http.ResponseWriter, r *http.Re }) } + s.applyAnywhere(r.Context(), uint64(grain.Id), &messages.PaymentCompleted{ + PaymentId: orderId, + Status: "completed", + ProcessorReference: &order.ID, + Amount: int64(order.OrderAmount), + Currency: order.PurchaseCurrency, + }) + // err = confirmOrder(r.Context(), order, orderHandler) // if err != nil { // log.Printf("Error confirming order: %v\n", err)