/** * Init the configuration array. * * Note: If you want a configuration value that don't need to be saved * in the database (like available currencies), setup it in here. */ private function _loadConfiguration() { global $smarty; $config = array(); foreach ($this->defaults as $key => $value) { $config[$key] = Configuration::get($key); } $config = $this->_validateConfiguration($config); //DO NOT TOUCH THIS LINE HERE $config['EVERYPAY_ACCEPTED_CURRENCIES'] = array('EUR'); $config['EVERYPAY_EXPIRATION_SECONDS'] = 10 * 60; //10 minutes //General smarty variables $generalSmarty = array('EVERYPAY_CUSTOMER_MODE' => $config['EVERYPAY_CUSTOMER_MODE'], 'EVERYPAY_BUTTON_MODE' => $config['EVERYPAY_BUTTON_MODE'], 'EVERYPAY_MODULE_NAME' => $this->name, 'EVERYPAY_LIVE_MODE' => $this->live_mode, 'EVERYPAY_PUBLIC_KEY' => $this->pk, 'EVERYPAY_TEMPLATE_DIR' => isset($module_template_dir) && !empty($module_template_dir) ? $module_template_dir : _MODULE_DIR_ . $this->name . '/'); if (!$this->live_mode) { Everypay::$isTest = true; } $smarty->assign($generalSmarty); $this->configuration = $config; return $config; }
public function setUp() { $credentials = $this->getFixtures()->offsetGet('everypay'); Everypay::setApiKey($credentials['secret_key']); Everypay::$isTest = false; }
protected function setUpClient() { Everypay::setApiKey($this->secretKey); Everypay::$isTest = $this->sandbox; AbstractResource::setClientOption(CurlClient::SSL_VERIFY_PEER, SSL_VERIFY_PEER); }