diff --git a/app/controllers/web-payments/apple-pay/merchant-validation.controller.js b/app/controllers/web-payments/apple-pay/merchant-validation.controller.js index 21f20ab6d..7c9e4536e 100644 --- a/app/controllers/web-payments/apple-pay/merchant-validation.controller.js +++ b/app/controllers/web-payments/apple-pay/merchant-validation.controller.js @@ -60,7 +60,13 @@ module.exports = async (req, res) => { key: merchantIdentityVars.key }); - const proxyAgent = proxyUrl ? new HttpsProxyAgent(proxyUrl) : null + const proxyAgentOptions = { + cert: merchantIdentityVars.cert, + key: merchantIdentityVars.key + }; + + const proxyAgent = proxyUrl ? new HttpsProxyAgent(proxyUrl, proxyAgentOptions) : null; + if (proxyUrl) { logger.info('Using proxy URL') }