test
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 42s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m52s

This commit is contained in:
matst80
2025-12-04 17:42:51 +01:00
parent fccb0eed06
commit ce81e294f2
2 changed files with 35 additions and 42 deletions

View File

@@ -400,18 +400,17 @@ func (s *CheckoutPoolServer) GetPaymentSessionHandler(w http.ResponseWriter, r *
}
switch payment.Provider {
case "adyen":
var payload *SessionRequest
payload := &SessionRequest{
SessionResult: "",
}
if r.Method != http.MethodGet {
payload = &SessionRequest{}
if err := json.NewDecoder(r.Body).Decode(payload); err != nil {
return err
}
}
service := s.adyenClient.Checkout()
req := service.PaymentsApi.GetResultOfPaymentSessionInput(paymentId)
if payload != nil {
req = req.SessionResult(payload.SessionResult)
}
req := service.PaymentsApi.GetResultOfPaymentSessionInput(paymentId).SessionResult(payload.SessionResult)
res, _, err := service.PaymentsApi.GetResultOfPaymentSession(r.Context(), req)
if err != nil {
return err