jdelta / consultar-sunat
There is no license information available for the latest version (v1.1) of this package.
Módulo para realizar consultas a SUNAT mediante el numero de RUC o DNI
v1.1
2019-03-04 22:18 UTC
Requires
- php: >=5.6|^7.2
- ext-curl: *
- lib-curl: *
This package is not auto-updated.
Last update: 2025-03-26 11:51:51 UTC
README
Módulo para realizar consultas a SUNAT mediante el numero de RUC o DNI
Instalación:
composer require jdelta/consultar-sunat
Uso:
use ConsultarSunat\SearchService; $service = new SearchService(); $ruc = "20169004359"; $dni = "44274795"; $result1 = $service->search($ruc); $result2 = $service->search($dni); var_dump($result1); var_dump($result2); if ($result1->success == true) { echo "Empresa: " . $result1->result->RazonSocial; } if ($result2->success == true) { echo "Persona: " . $result1->result->RazonSocial; } // Mostrar en formato XML/JSON echo $result1->json(); echo $result1->xml('empresa');
Creditos:
Josue Mazco Puma https://github.com/jossmp/sunatphp