<?php
 
	function env_or_default($key, $default = '') {
		$value = getenv($key);
		return ($value !== false && $value !== '') ? $value : $default;
	}

	define("DB_SERVER", 'localhost');
	
	if ($_SERVER['HTTP_HOST']=='localhost'){
		define("DB_USERNAME", env_or_default("DB_USERNAME", ''));
		define("DB_PASSWORD", env_or_default("DB_PASSWORD", ''));
		define("DB_DATABASE", env_or_default("DB_DATABASE", ''));
	} else {
		define("DB_USERNAME", env_or_default("DB_USERNAME", 'wishlistappsserv_wishlistuser'));
		define("DB_PASSWORD", env_or_default("DB_PASSWORD", 'co&_n,g@9D}$'));
		define("DB_DATABASE", env_or_default("DB_DATABASE", 'wishlistappsserv_wishlist'));
	}	


	define("BASE_PATH","https://wishlist.appsserver.net/bigcommerce_apps/wishlist/");
	
	define("APP_HEADING","Bigcommerce Wishlist App");
	
	define("CLIENT_ID", env_or_default("CLIENT_ID", "7u21nqsl34m00v9ek9c7apov46ogzkz"));
	
	define("CLIENT_SECRET", env_or_default("CLIENT_SECRET", "ff2dd22124dd990d7d1e62b99b02061755eb8c5a1dbd18de5f2658e1af47e393"));
	
	define("REDIRECT_URL", BASE_PATH."auth.php");
	
	//define("AJAX_URL", BASE_PATH."includes/ajaxserver.php");
	
	define("INDEX_URL", BASE_PATH."index.php");
	
	define("GRANT_TYPE","authorization_code");

	define("STORE_URL","https://wishlist-app.mybigcommerce.com/");

	$API_URL = "https://api.bigcommerce.com/stores/";
	
	// klaviyo credential   start
	define("KLAVIYO_ENDPOINT", "https://a.klaviyo.com/api/");
    //Wishlist Analytics - List ID: SGxeLg
    define("KLAVIYO_LIST_ID", "SGxeLg");
    define("KLAVIYO_PRIVATE_KEY", env_or_default("KLAVIYO_PRIVATE_KEY", "pk_fd80c97bfbdd3a4578333beb4d31b71454"));
	
	// klaviyo credential   end


?>