public static function setSecretKey($token)
    {
        if (!is_string($token)) {
            throw new Exception\ConfigurationException('Expected string values for the token.');
        }

        $clientConfiguration = new Payplug($token);

        self::setDefaultConfiguration($clientConfiguration);

        return $clientConfiguration;
    }
public static function setSecretKey($token)
    {
        if (!is_string($token)) {
            throw new Exception\ConfigurationException('Expected string values for the token.');
        }

        $clientConfiguration = new Payplug($token);

        self::setDefaultConfiguration($clientConfiguration);

        return $clientConfiguration;
    }
public static function setSecretKey ( $ token ) { if ( ! is_string ( $ token ) ) { throw new Exception \ ConfigurationException ( 'Expected string values for the token.' ) ; } $ clientConfiguration = new Payplug ( $ token ) ; self :: setDefaultConfiguration ( $ clientConfiguration ) ; return $ clientConfiguration ; }
Initializes a Authentication and sets it as the new default global authentication.
It also performs some checks before saving the authentication.

<pre>
Expected array format for argument $authentication :
$authentication['TOKEN'] = 'YOUR TOKEN'
</pre>

@param  string   $token  the authentication token

@return Payplug  the new client authentication

@throws Exception\ConfigurationException
Initializes a Authentication and sets it as the new default global authentication . It also performs some checks before saving the authentication .