Beispiel #1
0
 public function setDbConfig()
 {
     $ordersConfig = $this->config->get('ordersdb');
     $this->dbType = $ordersConfig[QCConfigKey::_ORDERS_DB_TYPE_CONFIG_KEY];
     $this->dbName = $ordersConfig[QCConfigKey::_ORDERS_DB_NAME_CONFIG_KEY];
     $this->dbServer = $ordersConfig[QCConfigKey::_ORDERS_DB_SERVER_CONFIG_KEY];
     $this->dbCharset = $ordersConfig[QCConfigKey::_ORDERS_DB_CHARSET_CONFIG_KEY];
     $this->dbPort = $ordersConfig[QCConfigKey::_ORDERS_DB_PORT_CONFIG_KEY];
     //all cred are stored in a separate cred file
     $credConfig = QCConfig::getCredConfig();
     $ckCredConfig = $credConfig->get(QCConfigKey::_CK_CREDENTIALS_CONFIG_SECTION);
     $this->dbUsername = $ckCredConfig[QCConfigKey::_ORDERS_DB_USERNAME_CONFIG_KEY];
     $this->dbPassword = $ckCredConfig[QCConfigKey::_ORDERS_DB_PASSWORD_CONFIG_KEY];
 }
Beispiel #2
0
 private function setupMailClient()
 {
     $aws = $this->config->get('aws');
     $credConfig = QCConfig::getCredConfig();
     if (!$credConfig) {
         throw new Exception("Missing AWS credentials file");
     }
     $this->mailClient = new PHPMailer();
     $this->mailClient->isSMTP();
     $this->mailClient->SMTPAuth = true;
     $this->debugSendEmail = $this->config->get('logs')[$this->debugSendEmailConfigKey];
     if ($this->debugSendEmail) {
         $this->mailClient->SMTPDebug = 2;
     }
     $this->mailClient->SMTPSecure = 'tls';
     $this->mailClient->Host = $aws['cklein.qc.aws.ses.host'];
     $this->mailClient->Port = $aws['cklein.qc.aws.ses.port'];
     $this->mailClient->setFrom("*****@*****.**");
     $this->mailClient->FromName = "Operations SP-eCommerce";
     $profile = $aws['cklein.qc.aws.ses.profile'];
     $this->mailClient->Username = $credConfig->get($profile)['aws_access_key_id'];
     $this->mailClient->Password = $credConfig->get($profile)['aws_secret_access_key'];
 }
Beispiel #3
0
 public function __construct()
 {
     $this->logger = QCLogger::getInstance();
     $this->config = QCConfig::getInstance();
     $csConfig = $this->config->get('cybersource');
     $this->csQueryPath = $csConfig[CSConfigKey::ONDEMAND_QUERY_PATH];
     $this->csMerchantID = $csConfig[CSConfigKey::ONDEMAND_REQ_MERCHANTID];
     $this->csEndpoint = $csConfig[CSConfigKey::ONDEMAND_REQ_ENDPOINT];
     $credConfig = QCConfig::getCredConfig()->get(QCConfigKey::_CK_CREDENTIALS_CONFIG_SECTION);
     $this->csUsername = $credConfig[CSConfigKey::ONDEMAND_REQ_USERNAME];
     $this->csPassword = $credConfig[CSConfigKey::ONDEMAND_REQ_PASSWORD];
 }