From 83593d9af435ff15b037768df7e136799972e757 Mon Sep 17 00:00:00 2001 From: Liz Martinez <40329316+elizabethmv@users.noreply.github.com> Date: Mon, 4 Dec 2023 14:55:42 -0600 Subject: [PATCH] Add SDK token for PayPal domain --- src/script.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/script.js b/src/script.js index 8f17f5c8..4893c67f 100644 --- a/src/script.js +++ b/src/script.js @@ -37,6 +37,7 @@ import { import { getPath, getDefaultNamespace, getSDKHost } from "./global"; import { CLIENT_ID_ALIAS } from "./config"; import { getComputedLocales } from "./utils"; +import { isPayPalDomain } from "./domains"; type GetSDKScript = () => HTMLScriptElement; @@ -338,6 +339,10 @@ export function getUserExperienceFlow(): ?string { return getSDKAttribute(SDK_SETTINGS.USER_EXPERIENCE_FLOW); } +export function getSDKToken(): ?string { + isPayPalDomain() ? getSDKAttribute(SDK_SETTINGS.SDK_TOKEN) : ""; +} + // whether in zoid window export function isChildWindow(): boolean { return Boolean(window.xprops);