diff --git a/app/Http/Controllers/Repuve/UpdateController.php b/app/Http/Controllers/Repuve/UpdateController.php index 0caee29..6152c46 100644 --- a/app/Http/Controllers/Repuve/UpdateController.php +++ b/app/Http/Controllers/Repuve/UpdateController.php @@ -264,7 +264,7 @@ public function vehicleUpdate(Request $request) // Consultar REPUVE Federal para obtener folio y tag_number try { - $repuveResponse = $this->repuveService->consultarVehiculo($nivEstatal, $placa); + $repuveResponse = $this->repuveService->consultarVehiculo($nivEstatal, null); if ($repuveResponse['has_error']) { DB::rollBack(); diff --git a/app/Services/RepuveService.php b/app/Services/RepuveService.php index 9d63226..88ccdb6 100644 --- a/app/Services/RepuveService.php +++ b/app/Services/RepuveService.php @@ -287,8 +287,12 @@ public function consultarVehiculo(?string $niv = null, ?string $placa = null) try { $url = $this->baseUrl . '/jaxws-consultarpv/ConsultaRpv'; - // Construir arg2: NIV|PLACA||||||| - $arg2 = ($niv ?? '') . '|' . ($placa ?? '') . str_repeat('|', 4); + // Construir arg2: NIV|||||||| + if ($placa) { + $arg2 = ($niv ?? '') . '|' . $placa . str_repeat('|', 5); + } else { + $arg2 = ($niv ?? '') . str_repeat('|', 7); + } $soapBody = <<