mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-24 09:40:21 +00:00
trabajando en respuesta ok tras el pago con tarjeta
This commit is contained in:
@ -71,7 +71,7 @@ public class RedsysController {
|
|||||||
|
|
||||||
String importeFormateado = Utils.formatCurrency(amountCents / 100.0, locale);
|
String importeFormateado = Utils.formatCurrency(amountCents / 100.0, locale);
|
||||||
ctx.setVariable("importe", importeFormateado);
|
ctx.setVariable("importe", importeFormateado);
|
||||||
ctx.setVariable("concepto", "TRANSF-" + p.getId());
|
ctx.setVariable("concepto", "TRANSF-" + p.getOrderId());
|
||||||
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
Authentication auth = SecurityContextHolder.getContext().getAuthentication();
|
||||||
boolean isAuth = auth != null
|
boolean isAuth = auth != null
|
||||||
&& auth.isAuthenticated()
|
&& auth.isAuthenticated()
|
||||||
@ -119,11 +119,7 @@ public class RedsysController {
|
|||||||
// GET: cuando el usuario cae aquí sin parámetros, o Redsys redirige por GET
|
// GET: cuando el usuario cae aquí sin parámetros, o Redsys redirige por GET
|
||||||
@GetMapping("/ok")
|
@GetMapping("/ok")
|
||||||
public String okGet(RedirectAttributes redirectAttrs, Model model, Locale locale) {
|
public String okGet(RedirectAttributes redirectAttrs, Model model, Locale locale) {
|
||||||
String msg = messageSource.getMessage("checkout.success.payment", null,
|
return "imprimelibros/pagos/pago-ok";
|
||||||
"Pago realizado con éxito. Gracias por su compra.", locale);
|
|
||||||
model.addAttribute("successPago", msg);
|
|
||||||
redirectAttrs.addFlashAttribute("successPago", msg);
|
|
||||||
return "redirect:/cart";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// POST: si Redsys envía Ds_Signature y Ds_MerchantParameters (muchas
|
// POST: si Redsys envía Ds_Signature y Ds_MerchantParameters (muchas
|
||||||
|
|||||||
@ -4,7 +4,8 @@ body {
|
|||||||
|
|
||||||
/* botón base */
|
/* botón base */
|
||||||
.btn-opcion-presupuesto {
|
.btn-opcion-presupuesto {
|
||||||
--vz-btn-color: #92b2a7; /* texto y borde */
|
--vz-btn-color: #92b2a7;
|
||||||
|
/* texto y borde */
|
||||||
--vz-btn-border-color: #92b2a7;
|
--vz-btn-border-color: #92b2a7;
|
||||||
--vz-btn-hover-color: #fff;
|
--vz-btn-hover-color: #fff;
|
||||||
--vz-btn-hover-bg: #92b2a7;
|
--vz-btn-hover-bg: #92b2a7;
|
||||||
@ -18,12 +19,13 @@ body {
|
|||||||
--vz-btn-disabled-border-color: #92b2a7;
|
--vz-btn-disabled-border-color: #92b2a7;
|
||||||
--vz-gradient: none;
|
--vz-gradient: none;
|
||||||
|
|
||||||
background-color: rgba(146, 178, 167, 0.2); /* no seleccionado */
|
background-color: rgba(146, 178, 167, 0.2);
|
||||||
|
/* no seleccionado */
|
||||||
color: #92b2a7;
|
color: #92b2a7;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* cuando el radio/checkbox está checked */
|
/* cuando el radio/checkbox está checked */
|
||||||
.btn-check:checked + .btn-opcion-presupuesto,
|
.btn-check:checked+.btn-opcion-presupuesto,
|
||||||
.btn-opcion-presupuesto.active {
|
.btn-opcion-presupuesto.active {
|
||||||
background-color: #92b2a7;
|
background-color: #92b2a7;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@ -32,18 +34,22 @@ body {
|
|||||||
|
|
||||||
/* Solo dentro del modal */
|
/* Solo dentro del modal */
|
||||||
.swal2-popup .form-switch-custom {
|
.swal2-popup .form-switch-custom {
|
||||||
font-size: 1rem; /* clave: fija el tamaño base del switch */
|
font-size: 1rem;
|
||||||
|
/* clave: fija el tamaño base del switch */
|
||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swal2-popup .form-switch-custom .form-check-input {
|
.swal2-popup .form-switch-custom .form-check-input {
|
||||||
float: none; /* por si acaso */
|
float: none;
|
||||||
|
/* por si acaso */
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swal2-popup .form-switch-custom .form-check-input:checked{
|
.swal2-popup .form-switch-custom .form-check-input:checked {
|
||||||
border-color: #92b2a7;
|
border-color: #92b2a7;
|
||||||
background-color: #cbcecd;
|
background-color: #cbcecd;
|
||||||
}
|
}
|
||||||
|
|
||||||
.swal2-popup .form-switch-custom .form-check-input:checked::before {
|
.swal2-popup .form-switch-custom .form-check-input:checked::before {
|
||||||
color: #92b2a7;
|
color: #92b2a7;
|
||||||
}
|
}
|
||||||
@ -58,12 +64,46 @@ body {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.alert-fadeout {
|
.alert-fadeout {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
transition: opacity 1s ease;
|
transition: opacity 1s ease;
|
||||||
animation: fadeout 4s forwards;
|
animation: fadeout 4s forwards;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes fadeout {
|
@keyframes fadeout {
|
||||||
0%, 70% { opacity: 1; }
|
|
||||||
100% { opacity: 0; }
|
0%,
|
||||||
|
70% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
100% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-container {
|
||||||
|
width: 300px;
|
||||||
|
height: 20px;
|
||||||
|
background-color: #e0e0e0;
|
||||||
|
border-radius: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.progress-bar-custom {
|
||||||
|
height: 100%;
|
||||||
|
background-color: #92b2a7;
|
||||||
|
border-radius: 10px;
|
||||||
|
width: 0;
|
||||||
|
animation: fillProgress 5s ease-in-out forwards;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fillProgress {
|
||||||
|
from {
|
||||||
|
width: 0%;
|
||||||
|
}
|
||||||
|
|
||||||
|
to {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<th:block layout:fragment="content">
|
<th:block layout:fragment="content">
|
||||||
<div th:if="${#authorization.expression('isAuthenticated()')}">
|
<div th:if="${#authorization.expression('isAuthenticated()')}">
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
<!-- contenido para usuario logueado -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div th:unless="${#authorization.expression('isAuthenticated()')}">
|
<div th:unless="${#authorization.expression('isAuthenticated()')}">
|
||||||
@ -36,8 +36,10 @@
|
|||||||
<div th:unless="${#authorization.expression('isAuthenticated()')}">
|
<div th:unless="${#authorization.expression('isAuthenticated()')}">
|
||||||
<script th:src="@{/assets/js/pages/imprimelibros/presupuestador/imagen-selector.js}"></script>
|
<script th:src="@{/assets/js/pages/imprimelibros/presupuestador/imagen-selector.js}"></script>
|
||||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestador/wizard-home.js}"></script>
|
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestador/wizard-home.js}"></script>
|
||||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestador/presupuesto-maquetacion.js}"></script>
|
<script type="module"
|
||||||
<script type="module" th:src="@{/assets/js/pages/imprimelibros/presupuestador/presupuesto-marcapaginas.js}"></script>
|
th:src="@{/assets/js/pages/imprimelibros/presupuestador/presupuesto-maquetacion.js}"></script>
|
||||||
|
<script type="module"
|
||||||
|
th:src="@{/assets/js/pages/imprimelibros/presupuestador/presupuesto-marcapaginas.js}"></script>
|
||||||
</div>
|
</div>
|
||||||
<script th:inline="javascript">
|
<script th:inline="javascript">
|
||||||
window.languageBundle = /*[[${languageBundle}]]*/ {};
|
window.languageBundle = /*[[${languageBundle}]]*/ {};
|
||||||
|
|||||||
Reference in New Issue
Block a user