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