FASE 3 - Motor fiscal interno en fe.parfumdelicieux.com Subir los archivos dentro de la carpeta apife/ respetando exactamente las rutas. Archivos incluidos: - apife/routes/api.php - apife/config/services.php - apife/app/Http/Middleware/InternalTokenMiddleware.php - apife/app/Http/Middleware/InternalBranchContext.php - apife/app/Http/Controllers/Api/Hacienda/DocumentoController.php - apife/app/Http/Requests/Documents/AddDocRequest.php - apife/app/Services/DocumentoService.php Agregar en el .env de fe.parfumdelicieux.com: FE_INTERNAL_TOKEN=CAMBIE_ESTE_TOKEN_LARGO_Y_PRIVADO FE_MAIN_APP_URL=https://parfumdelicieux.com FE_ALLOWED_INTERNAL_IPS= FE_ALLOWED_INTERNAL_IPS puede quedar vacío. Si desea cerrar por IP, coloque solo la IP del servidor del sistema principal. Ejemplo: FE_ALLOWED_INTERNAL_IPS=123.123.123.123 Endpoints internos creados: GET /api/internal/ping POST /api/internal/documentos/emitir POST /api/internal/documentos/consultar GET /api/internal/documentos/{clave}/estado GET /api/internal/documentos/{clave}/xml-firmado GET /api/internal/documentos/{clave}/xml-respuesta Headers requeridos: X-INTERNAL-TOKEN: el mismo valor de FE_INTERNAL_TOKEN Content-Type: application/json Accept: application/json Campos de contexto requeridos: sucursal_id terminal_id opcional cod_terminal opcional Prueba rápida: GET https://fe.parfumdelicieux.com/api/internal/ping Headers: X-INTERNAL-TOKEN: token X-SUCURSAL-ID: 1 Después de subir archivos, si tiene acceso en cPanel a ejecutar scripts PHP, limpiar caché de Laravel. Si no tiene consola, cree temporalmente un archivo protegido que ejecute: Artisan::call('config:clear'); Artisan::call('route:clear'); Artisan::call('cache:clear'); Luego elimine ese archivo.