This method is used to allow backwards compatibility.
public getTaxRateForCountry ( $countryCode, boolean $company = false ) : float | ||
$countryCode | ||
$company | boolean | |
Résultat | float |
/** * Get the tax percentage to apply to the subscription. * * @return int */ public function taxPercentage() { if (!Spark::collectsEuropeanVat()) { return 0; } $vatCalculator = new VatCalculator(); $vatCalculator->setBusinessCountryCode(Spark::homeCountry()); return $vatCalculator->getTaxRateForCountry($this->card_country, !empty($this->vat_id)) * 100; }
/** * Returns the tax rate for the given country. * * @return \Illuminate\Http\Response */ public function getTaxRateForCountry($country = null) { return ['tax_rate' => $this->calculator->getTaxRateForCountry($country)]; }