mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-13 00:48:49 +00:00
arreglados varios temas además del DL (redsys, etc)
This commit is contained in:
@ -273,6 +273,14 @@ public class PaymentService {
|
||||
throw new IllegalStateException("Error al solicitar la devolución a Redsys", e);
|
||||
}
|
||||
|
||||
// 🔧 NORMALIZAR ANTES DE GUARDAR
|
||||
if (gatewayRefundId != null) {
|
||||
gatewayRefundId = gatewayRefundId.trim();
|
||||
if (gatewayRefundId.isEmpty() || "000000".equals(gatewayRefundId)) {
|
||||
gatewayRefundId = null; // → múltiples NULL NO rompen el UNIQUE
|
||||
}
|
||||
}
|
||||
|
||||
PaymentTransaction tx = new PaymentTransaction();
|
||||
tx.setPayment(p);
|
||||
tx.setType(PaymentTransactionType.REFUND);
|
||||
|
||||
Reference in New Issue
Block a user