/** * Get the Mollie client. Needs the Config object to retrieve the API key. * * @param Config $config * * @return Mollie_API_Client */ public static function getAPIClient($config) { if (!self::$api_client && self::apiClientFound()) { require_once realpath(DIR_SYSTEM . "/..") . "/catalog/controller/payment/mollie-api-client/src/Mollie/API/Autoloader.php"; $mollie = new Mollie_API_Client(); $mollie->setApiKey($config->get('mollie_api_key')); $mollie->addVersionString("OpenCart/" . VERSION); $mollie->addVersionString("MollieOpenCart/" . self::PLUGIN_VERSION); self::$api_client = $mollie; } return self::$api_client; }