add more payment related shit
All checks were successful
Build and Publish / BuildAndDeployAmd64 (push) Successful in 37s
Build and Publish / BuildAndDeployArm64 (push) Successful in 4m10s

This commit is contained in:
matst80
2025-12-01 18:35:32 +01:00
parent d23bfe62a1
commit c227870f13
15 changed files with 821 additions and 173 deletions

View File

@@ -824,7 +824,7 @@ func (s *PoolServer) AdyenHookHandler(w http.ResponseWriter, r *http.Request) {
if err != nil {
log.Printf("Error capturing payment: %v", err)
} else {
log.Printf("Payment captured successfully: %v", res)
log.Printf("Payment captured successfully: %+v", res)
s.Apply(r.Context(), uint64(cartId), &messages.OrderCreated{
OrderId: res.PaymentPspReference,
Status: item.EventCode,
@@ -880,14 +880,14 @@ func (s *PoolServer) AdyenReturnHandler(w http.ResponseWriter, r *http.Request)
Payload: common.PtrString(r.URL.Query().Get("payload")),
},
})
log.Printf("Request for %s API:\n%+v\n", "PaymentDetails", dreq)
dres, httpRes, err := service.PaymentsApi.PaymentsDetails(r.Context(), dreq)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
log.Printf("Response for %s API::\n%+v\n", "PaymentDetails", res)
log.Printf("Payment details response: %+v", dres)
if !common.IsNil(dres.PspReference) && *dres.PspReference != "" {
var redirectURL string