getTaxRateForCountry() public method

This method is used to allow backwards compatibility.
public getTaxRateForCountry ( $countryCode, boolean $company = false ) : float
$countryCode
$company boolean
return float
Ejemplo n.º 1
0
 /**
  * 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;
 }
Ejemplo n.º 2
0
 /**
  * Returns the tax rate for the given country.
  *
  * @return \Illuminate\Http\Response
  */
 public function getTaxRateForCountry($country = null)
 {
     return ['tax_rate' => $this->calculator->getTaxRateForCountry($country)];
 }