forked from paypal/paypal-messaging-components
-
Notifications
You must be signed in to change notification settings - Fork 0
/
globals.js
46 lines (42 loc) · 1.54 KB
/
globals.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const postRobotGlobals = require('@krakenjs/post-robot/globals');
const zoidGlobals = require('@krakenjs/zoid/globals');
const { version } = require('./package.json');
const PORT = process.env.PORT || 8080;
module.exports = (env = { TARGET: 'sdk' }) => ({
__DISABLE_SET_COOKIE__: false,
__PAYPAL_DOMAIN__: 'https://www.paypal.com',
__ZOID__: {
...zoidGlobals.__ZOID__,
__DEFAULT_CONTAINER__: true,
__DEFAULT_PRERENDER__: true,
__FRAMEWORK_SUPPORT__: true,
__SCRIPT_NAMESPACE__: true
},
__POST_ROBOT__: {
...postRobotGlobals.__POST_ROBOT__,
__IE_POPUP_SUPPORT__: false,
__SCRIPT_NAMESPACE__: true
},
__MESSAGES__: {
__VERSION__: env.VERSION || version,
__FEATURES__: 'no-common',
__DEMO__: !!env.demo,
__NATIVE_MODAL__: true,
__TARGET__: env.TARGET.toUpperCase().replace(/-/g, '_'),
__STAGE_TAG__: env.STAGE_TAG,
__TEST_ENV__: env.TEST_ENV,
__DEV_TOUCHPOINT__: env.DEV_TOUCHPOINT,
__DOMAIN__: {
__LOCAL__: `https://localhost.paypal.com:${PORT}`,
__SANDBOX__: 'https://www.sandbox.paypal.com',
__PRODUCTION__: 'https://www.paypal.com'
},
__URI__: {
__MESSAGE__: '/credit-presentment/smart/message',
__TREATMENTS__: '/credit-presentment/experiments/local',
__MODAL__: '/credit-presentment/smart/modal',
__LOGGER__: '/credit-presentment/glog',
__CREDIT_APPLY__: '/ppcreditapply/da/us'
}
}
});