haciendo vista de pagos

This commit is contained in:
2025-11-04 15:29:29 +01:00
parent 7516e9e91e
commit dc64e40e38
11 changed files with 186 additions and 6 deletions

View File

@ -0,0 +1,20 @@
package com.imprimelibros.erp.payments;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
@RequestMapping("/pagos")
@PreAuthorize("hasRole('SUPERADMIN')")
public class PaymentController {
@GetMapping()
public String index() {
return "imprimelibros/pagos/gestion-pagos";
}
}

View File

@ -187,7 +187,7 @@ public class PaymentService {
p.setStatus(PaymentStatus.failed);
p.setFailedAt(LocalDateTime.now());
}
payRepo.save(p);
if (!authorized) {