@paypal/sdk-client
Advanced tools
Comparing version
{ | ||
"name": "@paypal/sdk-client", | ||
"version": "4.0.80", | ||
"version": "4.0.81", | ||
"description": "Shared config between PayPal/Braintree.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -5,5 +5,5 @@ /* @flow */ | ||
import { COUNTRY, SDK_SETTINGS, SDK_QUERY_KEYS, INTENT, COMMIT, VAULT, CURRENCY, FUNDING, CARD, COUNTRY_LANGS, | ||
DEFAULT_INTENT, DEFAULT_CURRENCY, DEFAULT_VAULT, QUERY_BOOL, LANG, type LocaleType, DEFAULT_SALE_COMMIT, DEFAULT_NONSALE_COMMIT } from '@paypal/sdk-constants/src'; | ||
DEFAULT_INTENT, DEFAULT_CURRENCY, DEFAULT_VAULT, QUERY_BOOL, LANG, type LocaleType, DEFAULT_SALE_COMMIT, DEFAULT_NONSALE_COMMIT, ENV } from '@paypal/sdk-constants/src'; | ||
import { getHost, getPath, getDefaultStageHost, getDefaultAPIStageHost } from './globals'; | ||
import { getHost, getPath, getDefaultStageHost, getDefaultAPIStageHost, getEnv } from './globals'; | ||
@@ -16,3 +16,6 @@ export const CLIENT_ID_ALIAS = { | ||
return inlineMemoize(getSDKScript, () => { | ||
const { host, path } = { host: getHost(), path: getPath() }; | ||
// Add new __SDK_HOST__ global instead of determining this on the client side | ||
const host = (getEnv() === ENV.SANDBOX) ? 'www.paypal.com' : getHost(); | ||
const path = getPath(); | ||
const script = getScript({ host, path }); | ||
@@ -19,0 +22,0 @@ |
60622
0.24%1124
0.18%