public function setCurrency($currency)
    {
        if (!is_numeric($currency) && strlen($currency) == 3) {
            $this->setCurrency(self::getCurrencyForCode($currency));
        } else {
            $this->_checkCurrency($currency);
            $this->_currency = $currency;
        }
    }
public function setCurrency($currency)
    {
        if (!is_numeric($currency) && strlen($currency) == 3) {
            $this->setCurrency(self::getCurrencyForCode($currency));
        } else {
            $this->_checkCurrency($currency);
            $this->_currency = $currency;
        }
    }
public function setCurrency ( $ currency ) { if ( ! is_numeric ( $ currency ) && strlen ( $ currency ) == 3 ) { $ this -> setCurrency ( self :: getCurrencyForCode ( $ currency ) ) ; } else { $ this -> _checkCurrency ( $ currency ) ; $ this -> _currency = $ currency ; } }
Sets the currency used.

<b>Note</b>:<br>
You can use the three letter shortening of the currency.<br>
E.g. "dkk", "eur", "nok" or "sek" instead of the constant.<br>

@param string|int $currency {@link KlarnaCurrency}

@see KlarnaCurrency

@throws KlarnaException
@return void
Sets the currency used .