https://github.com/itk-dev/os2forms_cvr_lookup
https://github.com/itk-dev/os2forms_cvr_lookup
Last synced: 7 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/itk-dev/os2forms_cvr_lookup
- Owner: itk-dev
- Created: 2021-06-18T06:39:35.000Z (almost 5 years ago)
- Default Branch: develop
- Last Pushed: 2023-05-09T09:08:31.000Z (almost 3 years ago)
- Last Synced: 2025-02-13T08:16:56.048Z (about 1 year ago)
- Language: PHP
- Size: 30.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OS2Forms CVR Lookup
Query the Danish CVR register for Drupal Webforms.
Service: https://digitaliseringskataloget.dk/integration/sf1530
## Installation
Require it with composer:
```shell
composer require "itk-dev/os2forms_cvr_lookup"
```
Enable it with drush:
```shell
drush pm:enable os2forms_cvr_lookup
```
Add the following configuration:
```php
$config['os2forms_cvr_lookup'] = [
'azure_tenant_id' => '',
'azure_application_id' => '',
'azure_client_secret' => '',
'azure_key_vault_name' => '',
'azure_key_vault_secret' => '',
'azure_key_vault_secret_version' => '',
'service_agreement_uuid' => '',
'user_system_uuid' => '',
'user_uuid' => '',
'service_uuid' => '',
'service_endpoint' => '',
'service_contract' => dirname(DRUPAL_ROOT) . '/vendor/itk-dev/serviceplatformen/resources/online-service-contract/wsdl/context/OnlineService.wsdl',
];
```
## Usage
This module provides functionality for querying the danish CVR register and showing the result.
In general terms you use it by adding a query element, which when changed performs a query and
populates other elements with the result.
The elements provided:
* CVR Element - Element which queries the Danish CVR register when changed.
* CVR Name Element - This is populated with the name from the above mentioned query result.
* CVR Street Element - This is filled with the name of the street from the result.
* CVR House Number Element - This is filled with the house number from the result.
* CVR Postal Code Element - This is filled with the postal code from the result.
* CVR City Element - This is filled with the city from the result.
## Coding standards
Run phpcs with the provided configuration:
```shell
composer coding-standards-check
// Apply coding standards
composer coding-standards-apply
```