diff --git a/src/Peru/Jne/Async/Dni.php b/src/Peru/Jne/Async/Dni.php index a10e0ed..c0c06e3 100644 --- a/src/Peru/Jne/Async/Dni.php +++ b/src/Peru/Jne/Async/Dni.php @@ -9,6 +9,7 @@ class Dni { private const URL_CONSULT = 'https://aplicaciones007.jne.gob.pe/srop_publico/Consulta/api/AfiliadoApi/GetNombresCiudadano'; + private const REQUEST_TOKEN = '30OB7qfO2MmL2Kcr1z4S0ttQcQpxH9pDUlZnkJPVgUhZOGBuSbGU4qM83JcSu7DZpZw-IIIfaDZgZ4vDbwE5-L9EPoBIHOOC1aSPi4FS_Sc1:clDOiaq7mKcLTK9YBVGt2R3spEU8LhtXEe_n5VG5VLPfG9UkAQfjL_WT9ZDmCCqtJypoTD26ikncynlMn8fPz_F_Y88WFufli38cUM-24PE1'; /** * @var ClientInterface @@ -51,7 +52,7 @@ public function get(string $dni): PromiseInterface [ 'Content-Type' => 'application/json;chartset=utf-8', 'Content-Length' => strlen($payload), - 'Requestverificationtoken' => '30OB7qfO2MmL2Kcr1z4S0ttQcQpxH9pDUlZnkJPVgUhZOGBuSbGU4qM83JcSu7DZpZw-IIIfaDZgZ4vDbwE5-L9EPoBIHOOC1aSPi4FS_Sc1:clDOiaq7mKcLTK9YBVGt2R3spEU8LhtXEe_n5VG5VLPfG9UkAQfjL_WT9ZDmCCqtJypoTD26ikncynlMn8fPz_F_Y88WFufli38cUM-24PE1', + 'Requestverificationtoken' => self::REQUEST_TOKEN, ]) ->then(function ($json) use ($dni) { $result = json_decode($json); diff --git a/src/Peru/Jne/Dni.php b/src/Peru/Jne/Dni.php index eed5afe..7ee8a36 100644 --- a/src/Peru/Jne/Dni.php +++ b/src/Peru/Jne/Dni.php @@ -17,6 +17,8 @@ class Dni implements DniInterface { private const URL_CONSULT = 'https://aplicaciones007.jne.gob.pe/srop_publico/Consulta/api/AfiliadoApi/GetNombresCiudadano'; + private const REQUEST_TOKEN = '30OB7qfO2MmL2Kcr1z4S0ttQcQpxH9pDUlZnkJPVgUhZOGBuSbGU4qM83JcSu7DZpZw-IIIfaDZgZ4vDbwE5-L9EPoBIHOOC1aSPi4FS_Sc1:clDOiaq7mKcLTK9YBVGt2R3spEU8LhtXEe_n5VG5VLPfG9UkAQfjL_WT9ZDmCCqtJypoTD26ikncynlMn8fPz_F_Y88WFufli38cUM-24PE1'; + /** * @var ClientInterface */ @@ -54,7 +56,7 @@ public function get(string $dni): ?Person json_encode(['CODDNI' => $dni]), [ 'Content-Type' => 'application/json;chartset=utf-8', - 'Requestverificationtoken' => '30OB7qfO2MmL2Kcr1z4S0ttQcQpxH9pDUlZnkJPVgUhZOGBuSbGU4qM83JcSu7DZpZw-IIIfaDZgZ4vDbwE5-L9EPoBIHOOC1aSPi4FS_Sc1:clDOiaq7mKcLTK9YBVGt2R3spEU8LhtXEe_n5VG5VLPfG9UkAQfjL_WT9ZDmCCqtJypoTD26ikncynlMn8fPz_F_Y88WFufli38cUM-24PE1', + 'Requestverificationtoken' => self::REQUEST_TOKEN, ]); $result = json_decode($json);