<?php
/*
 LOG LEVELS:
 1: ALL THE FUNCTIONS, EVEN HELPERS AND GET/SET-ERS
 2: FUNCTIONS TRIGGERED BY HUMANS ("TOP" LEVEL)
 3: STUFF HAPPENING ONLY ONCE PER ORDER (INIT, CALLBACKS ETC)
 4: ERRORS
 5: SUPER CRITICAL ERRORS 
*/
        
$curlConfig = array(
  "logLvl" => 1,
  "logPath" => __DIR__.'/log.txt',
  "global_salt" => 'thereisnospoon',

  //"stripe_api_key" => 'sk_test_xUTPRH2Sn7PtQvbT2Jw1UvLx',
  "stripe_api_key" => 'sk_live_K8mE4wJNOHpdR4q9E9hQQlCU',

  "stripe_api_key" => 'sk_live_K8mE4wJNOHpdR4q9E9hQQlCU', //LIVE - used to make charges
  "stripe_api_connect_auth_key" => "ca_DWEQUZ3Zn57XCso5SFZcSdq0PhMo4Yrt", // LIVE - used to connect customer accounts

  "email_smtp" => 'smtp.mailgun.org',  // Specify mailgun SMTP servers
  "email_user" => 'postmaster@mail.kwikk.se', // SMTP username from https://mailgun.com/cp/domains
  "email_password" => '813ab4e9233319df400d59b32b13a8b4-b892f62e-e1c1a70d', // SMTP password from https://mailgun.com/cp/domains
  "email_apikey" => 'key-107cdf2f0b8d7fa6de769d8bfdaf21c6',
  "email_from" => 'noreply@kwikk.se', // The FROM field, the address sending the email 

  //"stripe_api_key" => 'sk_live_K8mE4wJNOHpdR4q9E9hQQlCU',


  "sms_sender" => "KWIKK dev",
  "sms_api_key" => "kTJQjEA-TByUQdOFHqQC4uPDIkVb9xwHWFeShYvkpVYgAlaC2VTHF9LAFSpyW_BJ",


  "requestUrl" => "https://cpc.getswish.net/swish-cpcapi/api/v1",
  "callbackUrl" => "https://dev.api.kwikk.se/endpoints/cors-postcallback.php", //  "https://www.kwikk.se/monnae/api/endpoints/cors-postc$
  "dbName" => "ding-swish",
  //"payeeAlias" => "1235273602",
  "currency" => "SEK",

  //"CAINFO" => '/opt/bitnami/apache2/conf/certificates/swish/pi-swish-root-180216.pem', //Path to root CA
  //"SSLCERT" => '/opt/bitnami/apache2/conf/certificates/swish/pi-swish-client-180216.pem', //Path to cl$
  //"SSLKEY" => '/opt/bitnami/apache2/conf/certificates/swish/pi-swish-pk-180216.key', //Path to $
  "SSLCERTPASSWD" => '', //Password for client certificate, if it's protected
  "SSLKEYPASSWD" => '', //Password for private key password, if it's protected



  "testModeServer" => array(
    "requestUrl" => "https://mss.cpc.getswish.net/swish-cpcapi/api/v1",
    "callbackUrl" => "https://dev.api.kwikk.se/endpoints/cors-postcallback.php",
    "payeeAlias" => "1231181189",
    "currency" => "SEK",


    "CAINFO" => __DIR__ . '/cert/Merchants_Test/Getswish_C_test/Swish TLS Root CA.pem', //Path to root CA
    "SSLCERT" => __DIR__ . '/cert/Merchants_Test/Getswish_C_test/Swish Merchant Test Certificate 1231181189.pem', //Path to cl$
    "SSLKEY" => __DIR__ . '/cert/Merchants_Test/Getswish_C_test/Swish Merchant Test Certificate 1231181189.key', //Path to $
    "SSLCERTPASSWD" => 'swish', //Password for client certificate, if it's protected
    "SSLKEYPASSWD" => 'swish' //Password for private key password, if it's protected
  )
);

$sqlConfig = array(
  "host" => "130.211.76.137",
  "user" => "monnae-dev",
  "password" => "97Y1A64c8LfCcp31ql7aCkbj4IxKtf7",
  "database" => "monnae_swish_dev"
);


//admin settings
$database_location = $sqlConfig['host'];
$database_name =  $sqlConfig['database'];
$database_user =  $sqlConfig['user'];
$database_password =  $sqlConfig['password'];

$global_captcha_verify_url = 'https://www.google.com/recaptcha/api/siteverify';
$global_captcha_site_key = '6Lft5GAUAAAAAJAGv-4SCmG4KRR12Q-E1PpCBIda';
$global_captcha_secret_key = '6Lft5GAUAAAAANliIFmkp4r1pOdnv6YyMUQf6NaO';
$global_salt = 'thereisnospoon';
$global_payment_account = '10001';

$db = new PDO('mysql:host='.$database_location.';dbname='.$database_name.';charset=utf8mb4', $database_user, $database_password, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
$skeleton_table_id = '0';

$global_user_files = 'user_files/';
$global_certificates = '../cert/';
$global_site_path = '/';
