{$paypalProduct->getKeyName()} = $client->generateId($size = 21); }); } /** * @param string $locale * @return string */ public function formatToCurrency($value,$locale = 'de_DE') { $formatter = new NumberFormatter($locale, NumberFormatter::CURRENCY); return $formatter->formatCurrency($value, $this->currency_code); } public function getTaxPercent(){ $tax = Configuration::getValueByKey("SALES_TAX"); if ( $tax < 0 ) { return 0; } return $tax; } public function getTaxValue(){ return $this->price*$this->getTaxPercent()/100; } public function getTotalPrice(){ return $this->price+($this->getTaxValue()); } }