CoolCMS API

VatIdAutoCheckManager
in package

Automatic VAT id check after a save: registration, profile save, address book contact save.

Manager-tier orchestrator (not a service layer) over VatIdCheckManager and SellerTaxProfileManager; the verification policy itself stays in VatIdCheckManager.

  • Online only for a VAT id of another EU member state than the seller's country: a domestic CZ… id of a Czech seller does not change the treatment and is never checked automatically (it can be verified manually), a non-EU id has no VIES.
  • Policy RefreshStale: a valid manual / fresh VIES row answers without a call; a changed VAT id (a new pair without a row) or a stale answer goes online.
  • Limit: the per-IP safety cap ratelimit.vatIdCheck.autoIp (not the button quota of the user); null = unlimited.
  • Never throws: the save that triggered it is already committed — a failure is logged (tax) and reported as an unavailable VIES.

Seller: explicit id, otherwise the portal seller 7/invoice.default.sellerId (same chain as TaxResolveTrait).

Table of Contents

Properties

$sellerTaxProfileManager  : SellerTaxProfileManager
$settingContext  : SettingContext
$vatIdCheckManager  : VatIdCheckManager

Methods

__construct()  : mixed
verifyAfterSave()  : VatIdVerification, online: bool}
findPortalSellerId()  : int|null

Properties

Methods

verifyAfterSave()

public verifyAfterSave(string $vatId, string|null $countryCode, int|null $sellerId, VatIdCheckLimit|null $limit) : VatIdVerification, online: bool}
Parameters
$vatId : string
$countryCode : string|null

address country — used when the VAT id has no prefix

$sellerId : int|null
$limit : VatIdCheckLimit|null

per-IP safety cap (VatIdCheckManager::buildAutoCheckLimit()); null = unlimited

Return values
VatIdVerification, online: bool} —

online = the VAT id qualified for an online check

On this page

Search results