From 2e4315deecc7c7f94134207fe9265972aae31f1a Mon Sep 17 00:00:00 2001 From: "arun.mishra" Date: Wed, 13 Sep 2023 19:27:45 +0530 Subject: [PATCH 1/3] webpack changes for main repo release --- package-lock.json | 34 +++---------- package.json | 12 +++-- public/build.html | 63 ++++++++++++++++++++++++ public/index.html | 53 -------------------- src/GlobalVars.res | 2 + src/LoaderController.res | 2 - src/Utilities/ApiEndpoint.res | 21 -------- src/Utilities/PaymentHelpers.res | 32 +++--------- src/Utilities/RecoilAtoms.res | 1 - src/orca-loader/Elements.res | 7 +-- src/orca-loader/Hyper.res | 21 ++++---- src/orca-loader/HyperLoader.res | 2 +- src/orca-loader/LoaderPaymentElement.res | 8 +-- webpack.common.js | 59 +++++++++++----------- webpack.dev.js | 29 +++++++++++ yarn.lock | 8 +-- 16 files changed, 170 insertions(+), 184 deletions(-) create mode 100644 public/build.html delete mode 100644 public/index.html create mode 100644 webpack.dev.js diff --git a/package-lock.json b/package-lock.json index c9bbbf049..ebe9a856e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "orca-payment-page", - "version": "0.1.0", + "version": "0.0.49", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "orca-payment-page", - "version": "0.1.0", + "version": "0.0.49", "dependencies": { "@kount/kount-web-client-sdk": "^1.1.6", "@rescript/react": "^0.10.3", @@ -16,7 +16,8 @@ "bs-webapi": "^0.19.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "recoil": "^0.1.2" + "recoil": "^0.1.2", + "webpack-merge": "^5.9.0" }, "devDependencies": { "@commitlint/cli": "^17.7.1", @@ -8527,7 +8528,6 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/clone-deep/-/clone-deep-4.0.1.tgz", "integrity": "sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==", - "dev": true, "dependencies": { "is-plain-object": "^2.0.4", "kind-of": "^6.0.2", @@ -14524,7 +14524,6 @@ "version": "2.0.4", "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, "dependencies": { "isobject": "^3.0.1" }, @@ -14710,7 +14709,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -17428,7 +17426,6 @@ "version": "6.0.3", "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -18927,8 +18924,6 @@ }, "node_modules/npm/node_modules/@isaacs/cliui/node_modules/strip-ansi": { "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -21126,8 +21121,6 @@ }, "node_modules/npm/node_modules/postcss-selector-parser": { "version": "6.0.13", - "resolved": "https://registry.npmjs.org/postcss-selector-parser/-/postcss-selector-parser-6.0.13.tgz", - "integrity": "sha512-EaV1Gl4mUEV4ddhDnv/xtj7sxwrwxdetHdWUGnT4VJQf+4d05v6lHYZr8N573k5Z0BViss7BDhfWtKS3+sfAqQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -21514,8 +21507,6 @@ }, "node_modules/npm/node_modules/spdx-correct": { "version": "3.2.0", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", - "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", "dev": true, "inBundle": true, "license": "Apache-2.0", @@ -21546,8 +21537,6 @@ }, "node_modules/npm/node_modules/spdx-license-ids": { "version": "3.0.13", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", - "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", "dev": true, "inBundle": true, "license": "CC0-1.0" @@ -21566,8 +21555,6 @@ }, "node_modules/npm/node_modules/string_decoder": { "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", "dev": true, "inBundle": true, "license": "MIT", @@ -21904,8 +21891,6 @@ }, "node_modules/npm/node_modules/wrap-ansi/node_modules/strip-ansi": { "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", "dev": true, "inBundle": true, "license": "MIT", @@ -27088,7 +27073,6 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/shallow-clone/-/shallow-clone-3.0.1.tgz", "integrity": "sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==", - "dev": true, "dependencies": { "kind-of": "^6.0.2" }, @@ -30205,10 +30189,9 @@ } }, "node_modules/webpack-merge": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.8.0.tgz", - "integrity": "sha512-/SaI7xY0831XwP6kzuwhKWVKDP9t1QY1h65lAFLbZqMPIuYcD9QAW4u9STIbU9kaJbPBB/geU/gLr1wDjOhQ+Q==", - "dev": true, + "version": "5.9.0", + "resolved": "https://registry.npmjs.org/webpack-merge/-/webpack-merge-5.9.0.tgz", + "integrity": "sha512-6NbRQw4+Sy50vYNTw7EyOn41OZItPiXB8GNv3INSoe3PSFaHJEz3SHTrYVaRm2LilNGnFUzh0FAwqPEmU/CwDg==", "dependencies": { "clone-deep": "^4.0.1", "wildcard": "^2.0.0" @@ -30364,8 +30347,7 @@ "node_modules/wildcard": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/wildcard/-/wildcard-2.0.0.tgz", - "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==", - "dev": true + "integrity": "sha512-JcKqAHLPxcdb9KM49dufGXn2x3ssnfjbcaQdLlfZsL9rH9wgDQjUtDxbo8NE0F6SFvydeu1VhZe7hZuHsB2/pw==" }, "node_modules/word-wrap": { "version": "1.2.3", diff --git a/package.json b/package.json index b235dbc38..28f45ead2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "orca-payment-page", - "version": "0.1.0", + "version": "0.0.49", "main": "index.js", "private": true, "dependencies": { @@ -12,11 +12,15 @@ "bs-webapi": "^0.19.1", "react": "^18.2.0", "react-dom": "^18.2.0", - "recoil": "^0.1.2" + "recoil": "^0.1.2", + "webpack-merge": "^5.9.0" }, "scripts": { - "start": "concurrently \"webpack serve --config webpack.common.js\" \"webpack --config webpack.common.js\" \"webpack serve ./dist/HyperLoader.js --port 9090\"", - "build": "webpack --config webpack.common.js", + "build:dev": "webpack --config webpack.dev.js", + "start": "webpack serve --config webpack.dev.js", + "build:prod":"sdkEnv=prod webpack --config webpack.common.js", + "build:sandbox":"sdkEnv=sandbox webpack --config webpack.common.js", + "build:integ":"sdkEnv=integ webpack --config webpack.common.js", "test": "react-scripts test", "eject": "react-scripts eject", "re:build": "rescript", diff --git a/public/build.html b/public/build.html new file mode 100644 index 000000000..39826f61c --- /dev/null +++ b/public/build.html @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + Hyperswitch + + + + + + +
+ + + + + diff --git a/public/index.html b/public/index.html deleted file mode 100644 index 742f4b21f..000000000 --- a/public/index.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - Hyperswitch - - - - - - -
- - - - - \ No newline at end of file diff --git a/src/GlobalVars.res b/src/GlobalVars.res index 1cf9dbe8a..3afa56277 100644 --- a/src/GlobalVars.res +++ b/src/GlobalVars.res @@ -1,5 +1,7 @@ @val external repoName: string = "repoName" @val external repoVersion: string = "repoVersion" @val external repoPublicPath: string = "publicPath" +@val external backendEndPoint: string = "backendEndPoint" +@val external sdkUrl: string = "sdkUrl" let targetOrigin: string = "*" let sentryDSN = "https://47483766e76f4846a8023bfbe088f244@sentry.juspay.in/6" diff --git a/src/LoaderController.res b/src/LoaderController.res index af9f41cc2..053226977 100644 --- a/src/LoaderController.res +++ b/src/LoaderController.res @@ -31,7 +31,6 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => { open RecoilAtoms let invokeKountSDK = PaymentHelpers.invokeKountSDK(~fromScript=false) let (configAtom, setConfig) = Recoil.useRecoilState(configAtom) - let setApiEndpoint = Recoil.useSetRecoilState(endPoint) let (keys, setKeys) = Recoil.useRecoilState(keys) let (paymentlist, setList) = Recoil.useRecoilState(list) let (_, setSessions) = Recoil.useRecoilState(sessions) @@ -196,7 +195,6 @@ let make = (~children, ~paymentMode, ~setIntegrateErrorError, ~logger) => { if dict->getDictIsSome("publishableKey") { let publishableKey = dict->getString("publishableKey", "") logger.setMerchantId(publishableKey) - setApiEndpoint(._ => ApiEndpoint.getApiEndPoint(~publishableKey, ())) } if dict->getDictIsSome("paymentOptions") { diff --git a/src/Utilities/ApiEndpoint.res b/src/Utilities/ApiEndpoint.res index e51c943fd..51186d5e3 100644 --- a/src/Utilities/ApiEndpoint.res +++ b/src/Utilities/ApiEndpoint.res @@ -1,27 +1,6 @@ let switchToInteg = false let isLocal = false -let getSdkDomainUrl = (~publishableKey) => { - let sdkDomainUrl = - publishableKey->Js.String2.startsWith("pk_prd") - ? `https://checkout.hyperswitch.io${GlobalVars.repoPublicPath}` - : publishableKey->Js.String2.startsWith("pk_snd") - ? `https://beta.hyperswitch.io${GlobalVars.repoPublicPath}` - : `https://dev.hyperswitch.io${GlobalVars.repoPublicPath}` - isLocal ? "http://localhost:9050" : sdkDomainUrl -} - -let getApiEndPoint = (~publishableKey="", ()) => { - let testMode = publishableKey->Js.String2.startsWith("pk_snd_") - if Window.isProd { - testMode ? "https://sandbox.hyperswitch.io" : "https://api.hyperswitch.io" - } else if Window.isInteg || switchToInteg { - "https://integ-api.hyperswitch.io" - } else { - "https://sandbox.hyperswitch.io" - } -} - let addCustomPodHeader = (arr: array<(string, string)>, ~switchToCustomPod=?, ()) => { let customPod = switch switchToCustomPod { | Some(val) => val diff --git a/src/Utilities/PaymentHelpers.res b/src/Utilities/PaymentHelpers.res index 287ae321f..4f96cbd91 100644 --- a/src/Utilities/PaymentHelpers.res +++ b/src/Utilities/PaymentHelpers.res @@ -15,8 +15,7 @@ let closePaymentLoaderIfAny = () => let retrievePaymentIntent = (clientSecret, headers, ~optLogger, ~switchToCustomPod) => { open Promise let paymentIntentID = Js.String2.split(clientSecret, "_secret_")[0] - let endpoint = ApiEndpoint.getApiEndPoint() - let uri = `${endpoint}/payments/${paymentIntentID}?client_secret=${clientSecret}` + let uri = `${GlobalVars.backendEndPoint}/payments/${paymentIntentID}?client_secret=${clientSecret}` //let headers = [("Accept", "application/json"), ("api-key", publishableKey)] fetchApi( @@ -326,7 +325,6 @@ let intentCall = ( let usePaymentSync = (optLogger: option, paymentType: payment) => { let list = Recoil.useRecoilValueFromAtom(RecoilAtoms.list) let keys = Recoil.useRecoilValueFromAtom(RecoilAtoms.keys) - let endpoint = Recoil.useRecoilValueFromAtom(RecoilAtoms.endPoint) let switchToCustomPod = Recoil.useRecoilValueFromAtom(RecoilAtoms.switchToCustomPod) let setIsManualRetryEnabled = Recoil.useSetRecoilState(RecoilAtoms.isManualRetryEnabled) (~handleUserError=false, ~confirmParam: ConfirmType.confirmParams, ~iframeId="", ()) => { @@ -334,7 +332,7 @@ let usePaymentSync = (optLogger: option, paymentType: pay | Some(clientSecret) => let paymentIntentID = Js.String2.split(clientSecret, "_secret_")[0] let headers = [("Content-Type", "application/json"), ("api-key", confirmParam.publishableKey)] - let uri = `${endpoint}/payments/${paymentIntentID}?force_sync=true&client_secret=${clientSecret}` + let uri = `${GlobalVars.backendEndPoint}/payments/${paymentIntentID}?force_sync=true&client_secret=${clientSecret}` let paymentSync = () => { intentCall( @@ -372,7 +370,6 @@ let usePaymentIntent = (optLogger: option, paymentType: p let blockConfirm = Recoil.useRecoilValueFromAtom(RecoilAtoms.isConfirmBlocked) let switchToCustomPod = Recoil.useRecoilValueFromAtom(RecoilAtoms.switchToCustomPod) let list = Recoil.useRecoilValueFromAtom(RecoilAtoms.list) - let endpoint = Recoil.useRecoilValueFromAtom(RecoilAtoms.endPoint) let keys = Recoil.useRecoilValueFromAtom(RecoilAtoms.keys) let (isManualRetryEnabled, setIsManualRetryEnabled) = Recoil.useRecoilState( RecoilAtoms.isManualRetryEnabled, @@ -397,7 +394,7 @@ let usePaymentIntent = (optLogger: option, paymentType: p returnUrlArr, manual_retry, ]) - let uri = `${endpoint}/payments/${paymentIntentID}/confirm` + let uri = `${GlobalVars.backendEndPoint}/payments/${paymentIntentID}/confirm` let fetchMethod = Fetch.Post let loggerPayload = body->Js.Dict.fromArray->Js.Json.object_->Js.Json.stringify @@ -502,7 +499,6 @@ let useSessions = ( ~wallets=[], ~isDelayedSessionToken=false, ~optLogger, - ~endpoint, ~switchToCustomPod, (), ) => { @@ -519,7 +515,7 @@ let useSessions = ( ] ->Js.Dict.fromArray ->Js.Json.object_ - let uri = `${endpoint}/payments/session_tokens` + let uri = `${GlobalVars.backendEndPoint}/payments/session_tokens` fetchApi( uri, ~method_=Fetch.Post, @@ -578,16 +574,10 @@ let useSessions = ( }) } -let usePaymentMethodList = ( - ~clientSecret, - ~publishableKey, - ~endpoint, - ~logger, - ~switchToCustomPod, -) => { +let usePaymentMethodList = (~clientSecret, ~publishableKey, ~logger, ~switchToCustomPod) => { open Promise let headers = [("Content-Type", "application/json"), ("api-key", publishableKey)] - let uri = `${endpoint}/account/payment_methods?client_secret=${clientSecret}` + let uri = `${GlobalVars.backendEndPoint}/account/payment_methods?client_secret=${clientSecret}` fetchApi( uri, ~method_=Fetch.Get, @@ -645,16 +635,10 @@ let usePaymentMethodList = ( }) } -let useCustomerDetails = ( - ~clientSecret, - ~publishableKey, - ~endpoint, - ~optLogger, - ~switchToCustomPod, -) => { +let useCustomerDetails = (~clientSecret, ~publishableKey, ~optLogger, ~switchToCustomPod) => { open Promise let headers = [("Content-Type", "application/json"), ("api-key", publishableKey)] - let uri = `${endpoint}/customers/payment_methods?client_secret=${clientSecret}` + let uri = `${GlobalVars.backendEndPoint}/customers/payment_methods?client_secret=${clientSecret}` fetchApi( uri, diff --git a/src/Utilities/RecoilAtoms.res b/src/Utilities/RecoilAtoms.res index 882d4b6c6..63cc74e0e 100644 --- a/src/Utilities/RecoilAtoms.res +++ b/src/Utilities/RecoilAtoms.res @@ -43,7 +43,6 @@ let userAddressPincode = Recoil.atom(. "userAddressPincode", defaultFieldValues) let userAddressState = Recoil.atom(. "userAddressState", defaultFieldValues) let userAddressCountry = Recoil.atom(. "userAddressCountry", defaultFieldValues) let userBlikCode = Recoil.atom(. "userBlikCode", defaultFieldValues) -let endPoint = Recoil.atom(. "endpoint", "https://sandbox.hyperswitch.io") let fieldsComplete = Recoil.atom(. "fieldsComplete", false) let isManualRetryEnabled = Recoil.atom(. "isManualRetryEnabled", false) let userCurrency = Recoil.atom(. "userCurrency", "") diff --git a/src/orca-loader/Elements.res b/src/orca-loader/Elements.res index f2be653ec..774347b26 100644 --- a/src/orca-loader/Elements.res +++ b/src/orca-loader/Elements.res @@ -23,7 +23,6 @@ let make = ( ~publishableKey, ~applePaySessionRef, ~handleApplePayMessages, - ~sdkDomainUrl, ~logger: option, ) => { try { @@ -57,19 +56,17 @@ let make = ( ->Belt.Option.flatMap(Js.Json.decodeBoolean) ->Belt.Option.getWithDefault(false) : false - let endpoint = ApiEndpoint.getApiEndPoint(~publishableKey, ()) + let sessionsPromise = PaymentHelpers.useSessions( ~clientSecret=clientSecretId, ~publishableKey, ~optLogger=Some(logger), - ~endpoint, ~switchToCustomPod, (), ) let paymentMethodListPromise = PaymentHelpers.usePaymentMethodList( ~clientSecret=clientSecretId, ~publishableKey, - ~endpoint, ~logger, ~switchToCustomPod, ) @@ -146,7 +143,6 @@ let make = ( let customerDetailsPromise = PaymentHelpers.useCustomerDetails( ~clientSecret=clientSecretId, ~publishableKey, - ~endpoint, ~optLogger=Some(logger), ~switchToCustomPod, ) @@ -585,7 +581,6 @@ let make = ( setElementIframeRef, iframeRef, mountPostMessage, - sdkDomainUrl, // ~handleApplePayMessages, ) savedPaymentElement->Js.Dict.set(componentType, paymentElement) diff --git a/src/orca-loader/Hyper.res b/src/orca-loader/Hyper.res index b38cb123a..1574131a7 100644 --- a/src/orca-loader/Hyper.res +++ b/src/orca-loader/Hyper.res @@ -21,11 +21,15 @@ let preloadFile = (~type_, ~href=``, ()) => { checkAndAppend(`link[href="${href}"]`, link) } -let preloader = (~sdkDomainUrl) => { - preloadFile(~type_="document", ~href=`${sdkDomainUrl}/`, ()) - preloadFile(~type_="script", ~href=`${sdkDomainUrl}/app.js`, ()) - preloadFile(~type_="style", ~href=`${sdkDomainUrl}/app.css`, ()) - preloadFile(~type_="image", ~href=`${sdkDomainUrl}/icons/orca.svg`, ()) +let preloader = () => { + preloadFile(~type_="document", ~href=`${GlobalVars.sdkUrl}${GlobalVars.repoPublicPath}/`, ()) + preloadFile(~type_="script", ~href=`${GlobalVars.sdkUrl}${GlobalVars.repoPublicPath}/app.js`, ()) + preloadFile(~type_="style", ~href=`${GlobalVars.sdkUrl}${GlobalVars.repoPublicPath}/app.css`, ()) + preloadFile( + ~type_="image", + ~href=`${GlobalVars.sdkUrl}${GlobalVars.repoPublicPath}/icons/orca.svg`, + (), + ) preloadFile( ~type_="style", ~href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;600;700;800&display=swap", @@ -50,8 +54,7 @@ let preloader = (~sdkDomainUrl) => { let make = (publishableKey, _options: option, analyticsInfo: option) => { try { - let sdkDomainUrl = ApiEndpoint.getSdkDomainUrl(~publishableKey) - preloader(~sdkDomainUrl) + preloader() let analyticsInfoDict = analyticsInfo ->Belt.Option.flatMap(Js.Json.decodeObject) @@ -120,9 +123,8 @@ let make = (publishableKey, _options: option, analyticsInfo: option, analyticsInfo: option { ErrorUtils.manageErrorWarning(DEPRECATED_LOADSTRIPE, (), ~logger=OrcaLogger.defaultLoggerConfig) loadHyper(str, option) } - +Js.log4("VARS2", GlobalVars.sdkUrl, GlobalVars.repoVersion, GlobalVars.repoPublicPath) @val external window: {..} = "window" window["Hyper"] = Hyper.make diff --git a/src/orca-loader/LoaderPaymentElement.res b/src/orca-loader/LoaderPaymentElement.res index 8de5e8863..a1ae5dd40 100644 --- a/src/orca-loader/LoaderPaymentElement.res +++ b/src/orca-loader/LoaderPaymentElement.res @@ -12,7 +12,7 @@ type location = {replace: (. string) => unit} @val @scope(("navigator", "clipboard")) external writeText: string => Js.Promise.t<'a> = "writeText" -let make = (componentType, options, setIframeRef, iframeRef, mountPostMessage, sdkDomainUrl) => { +let make = (componentType, options, setIframeRef, iframeRef, mountPostMessage) => { try { let mountId = ref("") let setPaymentIframeRef = ref => { @@ -268,8 +268,8 @@ let make = (componentType, options, setIframeRef, iframeRef, mountPostMessage, s ) let iframeURL = fullscreenParam.contents != "" - ? `${sdkDomainUrl}/?fullscreenType=${fullscreenParam.contents}` - : `${sdkDomainUrl}/?fullscreenType=fullscreen` + ? `${GlobalVars.sdkUrl}${GlobalVars.repoPublicPath}/?fullscreenType=${fullscreenParam.contents}` + : `${GlobalVars.sdkUrl}${GlobalVars.repoPublicPath}/?fullscreenType=fullscreen` fullscreen.contents ? { open Promise @@ -333,7 +333,7 @@ let make = (componentType, options, setIframeRef, iframeRef, mountPostMessage, s