Download the PHP package seisigmasrl/dgii-rnc-validator without Composer
On this page you can find all versions of the php package seisigmasrl/dgii-rnc-validator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download seisigmasrl/dgii-rnc-validator
More information about seisigmasrl/dgii-rnc-validator
Files in seisigmasrl/dgii-rnc-validator
Package dgii-rnc-validator
Short Description A simple package to check a given RNC with the official Tax Authority, Dirección General de Impuestos Internos (DGII), in the Dominican Republic.
License MIT
Homepage https://github.com/seisigmasrl/dgii-rnc-validator
Informations about the package dgii-rnc-validator
Validate any RNC with the DGII
A simple package to check a given RNC with the official Tax Authority, Dirección General de Impuestos Internos (DGII), in the Dominican Republic and few more options.
Installation
You can install the package via composer:
Usage
This package aims to bring you a simple way to check and validate if a given RNC is valid and its current status with the tax authorities. Most existing solutions are based on parsing a monthly shared file with all the existing RNC by the Dirección General de Impuestos Internos (DGII), the official Tax Authority in the Dominican Republic.
This approach is excellent for improving performance, but It's not optimal for services requiring life, trusted information. For this reason, the current package provides a simple API to:
- Validate RNC's
- Verify if the Given RNC it's valid.
But how? There's 'somewhere' 😅, a "real" public non-documented endpoint used by the Tax Authorities that provide a set of tools to validate information with the DGII. This endpoint provides several options, but we will only use the RNC Validation for the scope of this package.
Here's the list of the provided methods by this package:
Check
Validate if a given RNC is valid and returns the details of the Taxpayer but false if not valid.
How to use it:
validateRNC
Validate if a given string is a valid RNC.
How to use it:
rncType
Validate if a given string is a valid RNC.
How to use it:
The Type enum includes two functions:
-
toString
: Return the string value from the returned enum. Ex: toCode
: Return the DGII type code value from the returned enum. Ex:
Helper Functions
Just in case you need a few extra tools, here's a list of utility functions:
getNumbers
This function returns all numbers from any provided string.
How to use it:
luhnAlgorithmValidation
This function validates if the given sequence of digits has a valid key (checksum).
How to use it:
validateDominicanCitizenId
This function validates if the given sequence of digits is a valid Dominican Citizen Id.
How to use it:
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Ricardo A. Vargas R.
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of dgii-rnc-validator with dependencies
ext-soap Version *