From 13e25251c7a3e21d4e2235b7beea75dfeae47534 Mon Sep 17 00:00:00 2001 From: Mark Moffat Date: Mon, 16 Dec 2019 18:28:52 +1030 Subject: [PATCH] Allow .env override in payment config --- lib/common.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/common.js b/lib/common.js index fb96ecc..218fdb9 100755 --- a/lib/common.js +++ b/lib/common.js @@ -249,6 +249,13 @@ const getPaymentConfig = () => { config = Object.assign(config, localConfigObj); } + // Override from .env file + Object.keys(config).forEach((configKey) => { + if(process.env[configKey]){ + config[configKey] = process.env[configKey]; + } + }); + return config; };