src/Klarna.php
public function config(
        $eid, $secret, $country, $language, $currency,
        $mode = Klarna::LIVE, $pcStorage = 'json', $pcURI = 'pclasses.json',
        $ssl = true
    ) {
        try {
            KlarnaConfig::$store = false;
            $this->config = new KlarnaConfig(null);

            $this->config['eid'] = $eid;
            $this->config['secret'] = $secret;
            $this->config['country']  = $country;
            $this->config['language'] = $language;
            $this->config['currency'] = $currency;
            $this->config['mode'] = $mode;
            $this->config['ssl'] = $ssl;
            $this->config['pcStorage'] = $pcStorage;
            $this->config['pcURI'] = $pcURI;

            $this->init();
        } catch(Exception $e) {
            $this->config = null;
            throw new KlarnaException(
                $e->getMessage(),
                $e->getCode()
            );
        }
    }
public function config(
        $eid, $secret, $country, $language, $currency,
        $mode = Klarna::LIVE, $pcStorage = 'json', $pcURI = 'pclasses.json',
        $ssl = true
    ) {
        try {
            KlarnaConfig::$store = false;
            $this->config = new KlarnaConfig(null);

            $this->config['eid'] = $eid;
            $this->config['secret'] = $secret;
            $this->config['country']  = $country;
            $this->config['language'] = $language;
            $this->config['currency'] = $currency;
            $this->config['mode'] = $mode;
            $this->config['ssl'] = $ssl;
            $this->config['pcStorage'] = $pcStorage;
            $this->config['pcURI'] = $pcURI;

            $this->init();
        } catch(Exception $e) {
            $this->config = null;
            throw new KlarnaException(
                $e->getMessage(),
                $e->getCode()
            );
        }
    }
public function config ( $ eid , $ secret , $ country , $ language , $ currency , $ mode = Klarna :: LIVE , $ pcStorage = 'json' , $ pcURI = 'pclasses.json' , $ ssl = true ) { try { KlarnaConfig :: $ store = false ; $ this -> config = new KlarnaConfig ( null ) ; $ this -> config [ 'eid' ] = $ eid ; $ this -> config [ 'secret' ] = $ secret ; $ this -> config [ 'country' ] = $ country ; $ this -> config [ 'language' ] = $ language ; $ this -> config [ 'currency' ] = $ currency ; $ this -> config [ 'mode' ] = $ mode ; $ this -> config [ 'ssl' ] = $ ssl ; $ this -> config [ 'pcStorage' ] = $ pcStorage ; $ this -> config [ 'pcURI' ] = $ pcURI ; $ this -> init ( ) ; } catch ( Exception $ e ) { $ this -> config = null ; throw new KlarnaException ( $ e -> getMessage ( ) , $ e -> getCode ( ) ) ; } }
Method of ease for setting common config fields.

The storage module for PClasses:<br>
Use 'xml' for xmlstorage.class.php.<br>
Use 'mysql' for mysqlstorage.class.php.<br>
Use 'json' for jsonstorage.class.php.<br>

The storage URI for PClasses:<br>
Use the absolute or relative URI to a file if {@link Klarna::$pcStorage}
is set as 'xml' or 'json'.<br>
Use a HTTP-auth similar URL if {@link Klarna::$pcStorage} is set as
mysql', e.g. user:passwd@addr:port/dbName.dbTable.
Or an associative array (recommended) {@see MySQLStorage}

<b>Note</b>:<br>
This disables the config file storage.<br>

@param int    $eid       Merchant ID/EID
@param string $secret    Secret key/Shared key
@param int    $country   {@link KlarnaCountry}
@param int    $language  {@link KlarnaLanguage}
@param int    $currency  {@link KlarnaCurrency}
@param int    $mode      {@link Klarna::LIVE} or {@link Klarna::BETA}
@param string $pcStorage PClass storage module.
@param string $pcURI     PClass URI.
@param bool   $ssl       Whether HTTPS (HTTP over SSL) or HTTP is used.

@see Klarna::setConfig()
@see KlarnaConfig

@throws KlarnaException
@return void
Method of ease for setting common config fields .