Skip to content

Adicionar um Exception quando CPF ou CNPJ foi inválido #5

@dersonsena

Description

@dersonsena

O SDK deverá disparar uma Exception InvalidCpfOrCnpjException quando a API retornar esse erro:

$responsePayload = $e->getResponsePayload();

if ($responsePayload['errors'][0]['description'] === 'O CPF ou CNPJ informado é inválido.') {
    throw new InvalidCpfOrCnpjException($cpfOrCnpj);
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions