Mollie\Laravel\Wrappers\MollieApiWrapper::__construct PHP Method

__construct() public method

MollieApiWrapper constructor.
public __construct ( Illuminate\Contracts\Config\Repository $config, Mollie_API_Client $client ) : void
$config Illuminate\Contracts\Config\Repository
$client Mollie_API_Client
return void
    public function __construct(Repository $config, Mollie_API_Client $client)
    {
        $this->config = $config;
        $this->client = $client;
        // Use only the 'live_' API key when 'test_mode' is DISABLED.
        if (!$this->config->get('mollie.test_mode')) {
            if ($this->config->has('mollie.keys.live')) {
                $this->setApiKey($this->config->get('mollie.keys.live'));
            }
        } else {
            if ($this->config->has('mollie.keys.test')) {
                $this->setApiKey($this->config->get('mollie.keys.test'));
            }
        }
    }