amit-patel/hmrc-vat-validator
最新稳定版本:1.0
Composer 安装命令:
composer require amit-patel/hmrc-vat-validator
包简介
A Laravel package for validating UK VAT numbers and Business Name using HMRC API
README 文档
README
This package will check UK VAT Number by using HMRC API.
What is this repository for?
- Easily integrte UK VAT Validation
- Also check Business Name of the VAT number belongs to.
How do I Install Package?
You can install the package via composer. Make sure comoser is installed if not then go through https://getcomposer.org/download/
Run the following command: Go to your laravel root directory
composer require amit-patel/hmrc-vat-validator
How do I Configure Package?
-
Step 1: Publish configuration Run following command:
php artisan vendor:publish --tag=config
This command will create a hmrcvatvalidator.php configuration file in your config directory.
-
Step 2: Set below environment variables in your .env file
HMRC_BASE_URL=https://test-api.service.hmrc.gov.uk (change it to production url when you are working with production enverinment) HMRC_CLIENT_ID=your-client-id HMRC_CLIENT_SECRET=your-client-secret
-
Step 3: Cleare all cache To ensure Laravel recognizes your new configuration, clear the configuration cache:
php artisan o:c
Use guidelines
Once you installation done succesfully. You can check VAT number.
- Step 1: Setup code in Controller in which you want to verify VAT number.
use AmitPatel\HmrcVatValidator\Facades\HmrcVatValidator; public function validateVat() { $response = HmrcVatValidator::validateVat('123456789'); return response()->json($response); }
Step 2: Setup routeRoute::get('/validate-vat', [YourController::class, 'validateVat']);
Who do I talk to?
- Name: Amit Patel
- LinkedIn: https://www.linkedin.com/in/amit-patel-0420a122/
License
This package is open-source software licensed under the MIT License.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-12-06