This class abstracts certain functionality around currency objects, currency codes and currency numbers relating to global currencies used in the Omnipay system.
Пример #1
0
 /**
  * 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;
 }
Пример #2
0
 public function testAll()
 {
     $currencies = Currency::all();
     $this->assertTrue(isset($currencies['USD']));
     $this->assertFalse(isset($currencies['XYZ']));
 }