Skip to content
Mike Madern edited this page Feb 8, 2018 · 1 revision

Frequently Asked Questions

Created February 8, 2018
Updated February 8, 2018

How do I manage my develop and production environment credentials?

Add your development and production credentials to your projects .htaccess file:

SetEnv VLEKS_MERCHANT_ID "-- YOUR MERCHANT ID --"
SetEnv VLEKS_CLUSTER_URL "-- YOUR CLUSTER URL --"
SetEnv VLEKS_PUBLIC_KEY "-- YOUR PUBLIC KEY --"
SetEnv VLEKS_PRIVATE_KEY "-- YOUR PRIVATE KEY --"

And use the following code in your PHP files:

$merchantId = getenv('VLEKS_MERCHANT_ID');
$clusterUrl = getenv('VLEKS_CLUSTER_URL');
$publicKey  = getenv('VLEKS_PUBLIC_KEY');
$privateKey = getenv('VLEKS_PRIVATE_KEY');

Using separate .htaccess files in your environments, credentials are switched automatically depending on the environment your application is in.

Clone this wiki locally