承接 malek83/polish-vat-payer 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

malek83/polish-vat-payer

Composer 安装命令:

composer require malek83/polish-vat-payer

包简介

Library using Polish Ministry of Finance WebService to validate if given VAT Number is registered as VAT Tax Payer in Poland

README 文档

README

Build Status

Polish VAT Payer

Simple library using Polish Ministry of Finance WebService to validate if given VAT Number is registered as VAT Tax Payer in Poland.

Contents

Installation

This library is available on Packagist:

$ composer require malek83/polish-vat-payer

Usage

There are two easy ways to use this library:

to get the boolean result of verification

use Malek83\PolishVatPayer\Builder\PolishVatPayerBuilder;
use Malek83\PolishVatPayer\PolishVatPayer;

/** @var PolishVatPayer $validator */
$validator = PolishVatPayerBuilder::builder()->build();

$bool = $validator->isValid('1568255600'); //returns boolean

to get the Full Response Object, containing all needed information

use Malek83\PolishVatPayer\Builder\PolishVatPayerBuilder;
use Malek83\PolishVatPayer\PolishVatPayer;

/** @var PolishVatPayer $validator */
$validator = PolishVatPayerBuilder::builder()->build();

/** @var \Malek83\PolishVatPayer\Result\PolishVatNumberVerificationResult $result */
$result = $validator->validate('1234567890');

var_dump($result->isValid()); // gives boolean, true if company is VAT Payer, otherwise false
var_dump($result->getVatNumber()); //gives string, the verificated VAT number
var_dump($result->getMessage()); //gives string, the human readable message

Request cache

Request cache can be used if necessary. Any PSR-16 Compatible component can be used (i.e. symfony/cache)

By default cache is turned off. To use cache call the setter method during building the facade

use Malek83\PolishVatPayer\Builder\PolishVatPayerBuilder;
use Malek83\PolishVatPayer\PolishVatPayer;

/** @var PolishVatPayer $validator */
$validator = PolishVatPayerBuilder::builder()
    ->setCache(new AnyPsr16CompatibleCache())
    ->setTtl(new DateInterval('PT1H'))
    ->build();

Default TTL is 1 hour. It can be also overriden while during the build process.

Request Log

Request log can be defined also. It's PSR-3 Compatible (i.e. Monolog)

By default it's turned off, to turn it on simply call setLogger while building:

use Malek83\PolishVatPayer\Builder\PolishVatPayerBuilder;
use Malek83\PolishVatPayer\PolishVatPayer;

/** @var PolishVatPayer $validator */
$validator = PolishVatPayerBuilder::builder()
    ->setLogger(new AnyPsr3CompatibleLogger())
    ->build();

Roadmap

All future features are listed in Roadmap GitHub project.

Changelog

Please see CHANGELOG file for more information what has changed recently.

Local environment for development & testing

$ docker build -t polish-vat-payer ./docker/

$ docker run -d --name polish-vat-payer --volume ${PWD}:/source polish-vat-payer

License

The MIT License (MIT). Please see License for more information.

统计信息

  • 总下载量: 2.52k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-07-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固