/** * Get the number of decimal places in the payment currency. * * @return integer */ public function getCurrencyDecimalPlaces() { if ($currency = Currency::find($this->getCurrency())) { return $currency->getDecimals(); } return 2; }
public function testUnknownCurrencyReturnsNull() { $currency = Currency::find('XYZ'); $this->assertNull($currency); }