예제 #1
0
 public function testGetCurrencies()
 {
     $currencies = Utilities::getCurrencies();
     $this->assertArrayHasKey('GBP', $currencies);
     $this->assertArrayHasKey('AUD', $currencies);
     $this->assertArrayHasKey('USD', $currencies);
 }
예제 #2
0
파일: Shared.php 프로젝트: dwmsw/sagepay
 /**
  * Set currency in which you wish to trade
  *
  * @param string $currency Currency
  */
 public function setCurrency($currency)
 {
     $currencies = Utilities::getCurrencies();
     if (isset($currencies[$currency])) {
         $this->currency = $currency;
     } else {
         throw new InvalidArgumentException("Invalid currency code, ISO 4217 Expected" . $currency . " given");
     }
 }