Fix: RepuveService consultar vehiculo

This commit is contained in:
Juan Felipe Zapata Moreno 2025-12-08 10:18:43 -06:00
parent ff7b4a7d3d
commit ffc0fd1fd9
2 changed files with 7 additions and 3 deletions

View File

@ -264,7 +264,7 @@ public function vehicleUpdate(Request $request)
// Consultar REPUVE Federal para obtener folio y tag_number // Consultar REPUVE Federal para obtener folio y tag_number
try { try {
$repuveResponse = $this->repuveService->consultarVehiculo($nivEstatal, $placa); $repuveResponse = $this->repuveService->consultarVehiculo($nivEstatal, null);
if ($repuveResponse['has_error']) { if ($repuveResponse['has_error']) {
DB::rollBack(); DB::rollBack();

View File

@ -287,8 +287,12 @@ public function consultarVehiculo(?string $niv = null, ?string $placa = null)
try { try {
$url = $this->baseUrl . '/jaxws-consultarpv/ConsultaRpv'; $url = $this->baseUrl . '/jaxws-consultarpv/ConsultaRpv';
// Construir arg2: NIV|PLACA||||||| // Construir arg2: NIV||||||||
$arg2 = ($niv ?? '') . '|' . ($placa ?? '') . str_repeat('|', 4); if ($placa) {
$arg2 = ($niv ?? '') . '|' . $placa . str_repeat('|', 5);
} else {
$arg2 = ($niv ?? '') . str_repeat('|', 7);
}
$soapBody = <<<XML $soapBody = <<<XML
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://consultaRpv.org/wsdl"> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:wsdl="http://consultaRpv.org/wsdl">