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

This commit is contained in:
matst80
2025-12-04 18:12:50 +01:00
parent 3d9d703a76
commit e9fb00d5c7
2 changed files with 9 additions and 9 deletions

View File

@@ -458,7 +458,7 @@ func (s *CheckoutPoolServer) StartPaymentHandler(w http.ResponseWriter, r *http.
return err
}
// Apply PaymentStarted mutation
_, err = s.ApplyLocal(r.Context(), checkoutId, &messages.PaymentStarted{
result, err := s.ApplyLocal(r.Context(), checkoutId, &messages.PaymentStarted{
PaymentId: session.Id,
Amount: session.Amount.Value,
Currency: session.Amount.Currency,
@@ -475,7 +475,7 @@ func (s *CheckoutPoolServer) StartPaymentHandler(w http.ResponseWriter, r *http.
return err
}
return s.WriteResult(w, session)
return s.WriteResult(w, result)
case "klarna":
order, err := s.CreateOrUpdateCheckout(r, grain, nil)
@@ -488,7 +488,7 @@ func (s *CheckoutPoolServer) StartPaymentHandler(w http.ResponseWriter, r *http.
logger.Error("unable to marshal order", "error", err)
return err
}
_, err = s.ApplyLocal(r.Context(), checkoutId, &messages.PaymentStarted{
result, err := s.ApplyLocal(r.Context(), checkoutId, &messages.PaymentStarted{
PaymentId: order.ID,
Amount: int64(order.OrderAmount),
Currency: order.PurchaseCurrency,
@@ -505,7 +505,7 @@ func (s *CheckoutPoolServer) StartPaymentHandler(w http.ResponseWriter, r *http.
return err
}
return s.WriteResult(w, order)
return s.WriteResult(w, result)
default:
http.Error(w, "unsupported payment provider", http.StatusBadRequest)