From 1f3cc6bd44cfb0e1086920cb7631e6ba416ec74b Mon Sep 17 00:00:00 2001 From: sakksham7 <130480324+sakksham7@users.noreply.github.com> Date: Mon, 9 Sep 2024 11:06:47 +0530 Subject: [PATCH 1/2] fix: integ env in webpack (#602) Co-authored-by: Saksham Sharma --- webpack.common.js | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) diff --git a/webpack.common.js b/webpack.common.js index a2b8c40ff..3b6b748fa 100644 --- a/webpack.common.js +++ b/webpack.common.js @@ -36,15 +36,36 @@ const getSdkUrl = (env, customUrl) => { }; const sdkUrl = getSdkUrl(sdkEnv, envSdkUrl); +const getEnvironmentDomain = (prodDomain, integDomain, defaultDomain) => { + switch (sdkEnv) { + case "prod": + return prodDomain; + case "integ": + return integDomain; + default: + return defaultDomain; + } +}; + +const backendDomain = getEnvironmentDomain("checkout", "dev", "beta"); +const confirmDomain = getEnvironmentDomain("api", "integ-api", "sandbox"); +const logDomain = getEnvironmentDomain("api", "integ-api", "sandbox"); + const backendEndPoint = - envBackendUrl || - `https://${sdkEnv === "prod" ? "checkout" : "beta"}.hyperswitch.io/api`; + envBackendUrl || `https://${backendDomain}.hyperswitch.io/api`; + const confirmEndPoint = - envBackendUrl || - `https://${sdkEnv === "prod" ? "api" : "sandbox"}.hyperswitch.io`; + envBackendUrl || `https://${confirmDomain}.hyperswitch.io`; + const logEndpoint = - envLoggingUrl || - `https://${sdkEnv === "prod" ? "api" : "sandbox"}.hyperswitch.io/logs/sdk`; + envLoggingUrl || `https://${logDomain}.hyperswitch.io/logs/sdk`; + +console.log("Test SDK values ===>", { + sdkEnv, + sdkUrl, + backendEndPoint, + confirmEndPoint, +}); const enableLogging = true; const loggingLevel = "DEBUG"; From 65f873dabb67bfb966a0d51e8e2bfebefbc2c026 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Mon, 9 Sep 2024 05:38:15 +0000 Subject: [PATCH 2/2] chore(release): 0.84.15 [skip ci] ## [0.84.15](https://github.com/juspay/hyperswitch-web/compare/v0.84.14...v0.84.15) (2024-09-09) ### Bug Fixes * integ env in webpack ([#602](https://github.com/juspay/hyperswitch-web/issues/602)) ([1f3cc6b](https://github.com/juspay/hyperswitch-web/commit/1f3cc6bd44cfb0e1086920cb7631e6ba416ec74b)) --- CHANGELOG.md | 7 +++++++ package-lock.json | 4 ++-- package.json | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc5731fd4..2d4a31175 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [0.84.15](https://github.com/juspay/hyperswitch-web/compare/v0.84.14...v0.84.15) (2024-09-09) + + +### Bug Fixes + +* integ env in webpack ([#602](https://github.com/juspay/hyperswitch-web/issues/602)) ([1f3cc6b](https://github.com/juspay/hyperswitch-web/commit/1f3cc6bd44cfb0e1086920cb7631e6ba416ec74b)) + ## [0.84.14](https://github.com/juspay/hyperswitch-web/compare/v0.84.13...v0.84.14) (2024-09-04) diff --git a/package-lock.json b/package-lock.json index 93cfa4bd5..9f8bb01ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.84.14", + "version": "0.84.15", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.84.14", + "version": "0.84.15", "hasInstallScript": true, "dependencies": { "@glennsl/rescript-fetch": "^0.2.0", diff --git a/package.json b/package.json index 257382a6c..78bb089eb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.84.14", + "version": "0.84.15", "main": "index.js", "private": true, "dependencies": {