public isValidVATNumber ( $vatNumber ) : boolean | ||
$vatNumber | ||
return | boolean |
/** * Returns the tax rate for the given country. * * @param string $vat_id * * @throws \Mpociot\VatCalculator\Exceptions\VATCheckUnavailableException * * @return \Illuminate\Http\Response */ public function validateVATID($vat_id) { try { $isValid = $this->calculator->isValidVATNumber($vat_id); $message = ''; } catch (VATCheckUnavailableException $e) { $isValid = false; $message = $e->getMessage(); } return ['vat_id' => $vat_id, 'is_valid' => $isValid, 'message' => $message]; }