ibericode / vat

PHP library for dealing with European VAT
https://packagist.org/packages/ibericode/vat
MIT License
425 stars 61 forks source link

Always Invalid country code when trying to get rates #51

Closed Stelikas closed 2 years ago

Stelikas commented 2 years ago

I'm trying to grab VAT rates for specific countries but i always get the error:

Invalid country code "country"

What i'm doing:

        $rates = new Rates($_SERVER["DOCUMENT_ROOT"].'assets/vat.txt');
        $rate = $rates->getRateForCountry('NL'); // 21
        return $rate;
Stelikas commented 2 years ago

That error happened because i had already created the txt file manually.