Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Adicione condutor a MDF-e autorizado com $mdfe->includeDriver() — evento 110114.
110114
use Suot\Fiscal\Core\Exception\InfrastructureException; use Suot\Fiscal\Core\Result\RetryMode; use Suot\Fiscal\Mdfe\Data\MdfeDriver; try { $result = $mdfe->includeDriver() ->forOperation('ot-123-mdfe-driver') ->inHomologation() ->accessKey($chave44) ->emitterCnpj($cnpj) ->withDriver(new MdfeDriver( name: 'Joao da Silva', cpf: '12345678901', )) ->handle(); } catch (InfrastructureException $e) { $failure = $e->toFailure('include_driver'); // Host: alertar; QueryBeforeRetry se timeout após envio throw $e; } if ($result->isDriverIncluded()) { // Host: persistir protocolNumber do evento; atualizar condutor na OT } if (! $result->isDriverIncluded()) { $failure = $result->failure(); $policy = $result->retryPolicy(); match ($policy?->mode) { RetryMode::AfterCorrection => /* corrigir CPF/nome e tentar de novo */, RetryMode::QueryBeforeRetry => /* byAccessKey() antes de reenviar */, RetryMode::AfterDelay, RetryMode::Immediate => /* filar conforme política */, RetryMode::Never, null => /* definitivo; não reenviar */, }; }
IncludeDriverMdfeResult
isDriverIncluded()
failure()
retryPolicy()