@paypal/checkout-components 5.0.256 → 5.0.258

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (185) hide show
  1. package/README.md +8 -0
  2. package/__sdk__.js +72 -76
  3. package/dist/button.js +1 -1
  4. package/globals.js +28 -30
  5. package/package.json +6 -4
  6. package/src/constants/button.js +37 -36
  7. package/src/constants/class.js +32 -30
  8. package/src/constants/index.js +3 -3
  9. package/src/constants/misc.js +14 -12
  10. package/src/declarations.js +19 -19
  11. package/src/funding/applepay/config.jsx +51 -50
  12. package/src/funding/applepay/index.js +1 -1
  13. package/src/funding/applepay/style.scoped.scss +1 -1
  14. package/src/funding/applepay/template.jsx +16 -11
  15. package/src/funding/bancontact/config.jsx +48 -37
  16. package/src/funding/bancontact/index.js +1 -2
  17. package/src/funding/blik/config.jsx +48 -37
  18. package/src/funding/blik/index.js +1 -2
  19. package/src/funding/boleto/config.jsx +50 -39
  20. package/src/funding/boleto/index.js +1 -2
  21. package/src/funding/card/amex/config.js +9 -8
  22. package/src/funding/card/amex/index.js +1 -2
  23. package/src/funding/card/config.jsx +246 -177
  24. package/src/funding/card/discover/config.js +9 -7
  25. package/src/funding/card/discover/index.js +1 -2
  26. package/src/funding/card/elo/config.js +6 -7
  27. package/src/funding/card/elo/index.js +1 -2
  28. package/src/funding/card/hiper/config.js +9 -7
  29. package/src/funding/card/hiper/index.js +1 -2
  30. package/src/funding/card/index.js +1 -1
  31. package/src/funding/card/jcb/config.js +6 -7
  32. package/src/funding/card/jcb/index.js +1 -2
  33. package/src/funding/card/mastercard/config.js +9 -7
  34. package/src/funding/card/mastercard/index.js +1 -2
  35. package/src/funding/card/visa/config.js +9 -7
  36. package/src/funding/card/visa/index.js +1 -2
  37. package/src/funding/common.jsx +242 -216
  38. package/src/funding/config.js +212 -65
  39. package/src/funding/content.jsx +1946 -337
  40. package/src/funding/credit/config.jsx +74 -57
  41. package/src/funding/credit/index.js +1 -2
  42. package/src/funding/eps/config.jsx +45 -37
  43. package/src/funding/eps/index.js +1 -2
  44. package/src/funding/funding.js +193 -100
  45. package/src/funding/giropay/config.jsx +48 -38
  46. package/src/funding/giropay/index.js +1 -2
  47. package/src/funding/ideal/config.jsx +48 -37
  48. package/src/funding/ideal/index.js +1 -2
  49. package/src/funding/index.js +2 -2
  50. package/src/funding/itau/config.jsx +41 -41
  51. package/src/funding/itau/index.js +1 -1
  52. package/src/funding/maxima/config.jsx +25 -19
  53. package/src/funding/maxima/index.js +1 -2
  54. package/src/funding/mercadopago/config.jsx +48 -37
  55. package/src/funding/mercadopago/index.js +1 -2
  56. package/src/funding/multibanco/config.jsx +50 -39
  57. package/src/funding/multibanco/index.js +1 -2
  58. package/src/funding/mybank/config.jsx +48 -37
  59. package/src/funding/mybank/index.js +1 -2
  60. package/src/funding/oxxo/config.jsx +50 -39
  61. package/src/funding/oxxo/index.js +1 -2
  62. package/src/funding/p24/config.jsx +45 -37
  63. package/src/funding/p24/index.js +1 -2
  64. package/src/funding/paidy/config.jsx +50 -39
  65. package/src/funding/paidy/index.js +1 -1
  66. package/src/funding/paylater/config.jsx +118 -111
  67. package/src/funding/paylater/index.js +1 -2
  68. package/src/funding/paypal/config.jsx +44 -46
  69. package/src/funding/paypal/index.js +1 -2
  70. package/src/funding/paypal/style.scoped.scss +80 -74
  71. package/src/funding/paypal/template.jsx +450 -354
  72. package/src/funding/payu/config.jsx +50 -39
  73. package/src/funding/payu/index.js +1 -1
  74. package/src/funding/satispay/config.jsx +50 -39
  75. package/src/funding/satispay/index.js +1 -1
  76. package/src/funding/sepa/config.jsx +19 -13
  77. package/src/funding/sepa/index.js +1 -2
  78. package/src/funding/sofort/config.jsx +48 -37
  79. package/src/funding/sofort/index.js +1 -2
  80. package/src/funding/trustly/config.jsx +50 -39
  81. package/src/funding/trustly/index.js +1 -2
  82. package/src/funding/venmo/config.jsx +80 -75
  83. package/src/funding/venmo/index.js +1 -2
  84. package/src/funding/venmo/style.scoped.scss +30 -32
  85. package/src/funding/venmo/template.jsx +56 -57
  86. package/src/funding/verkkopankki/config.jsx +50 -39
  87. package/src/funding/verkkopankki/index.js +1 -1
  88. package/src/funding/wechatpay/config.jsx +48 -37
  89. package/src/funding/wechatpay/index.js +1 -2
  90. package/src/funding/zimpler/config.jsx +19 -13
  91. package/src/funding/zimpler/index.js +1 -2
  92. package/src/interface/button.js +60 -44
  93. package/src/interface/card-fields.js +11 -8
  94. package/src/interface/fields.js +7 -4
  95. package/src/interface/marks.js +4 -4
  96. package/src/interface/payment-fields.js +7 -4
  97. package/src/interface/wallet.js +4 -4
  98. package/src/lib/errors.js +7 -7
  99. package/src/lib/index.js +5 -5
  100. package/src/lib/isRTLLanguage.js +3 -3
  101. package/src/lib/perceived-latency-instrumentation.js +54 -36
  102. package/src/lib/security.js +21 -17
  103. package/src/lib/session.js +39 -35
  104. package/src/marks/component.jsx +114 -65
  105. package/src/marks/index.js +1 -2
  106. package/src/marks/template.jsx +79 -65
  107. package/src/types.js +48 -48
  108. package/src/ui/buttons/button.jsx +311 -249
  109. package/src/ui/buttons/buttonDesigns/control.jsx +3 -5
  110. package/src/ui/buttons/buttonDesigns/divideLogoAnimation.jsx +127 -99
  111. package/src/ui/buttons/buttonDesigns/index.js +78 -75
  112. package/src/ui/buttons/buttonDesigns/inlineLogoTextDesign.jsx +102 -82
  113. package/src/ui/buttons/buttonDesigns/script.jsx +24 -18
  114. package/src/ui/buttons/buttonDesigns/types.js +6 -7
  115. package/src/ui/buttons/buttons.jsx +318 -212
  116. package/src/ui/buttons/config.js +62 -59
  117. package/src/ui/buttons/content.jsx +304 -119
  118. package/src/ui/buttons/index.js +1 -1
  119. package/src/ui/buttons/menu-button/index.js +1 -1
  120. package/src/ui/buttons/menu-button/menu-button.jsx +29 -22
  121. package/src/ui/buttons/menu-button/menu-button.scoped.scss +16 -17
  122. package/src/ui/buttons/poweredBy.jsx +23 -23
  123. package/src/ui/buttons/props.js +680 -529
  124. package/src/ui/buttons/script.jsx +182 -160
  125. package/src/ui/buttons/spinner.jsx +4 -6
  126. package/src/ui/buttons/style.jsx +15 -14
  127. package/src/ui/buttons/styles/base.js +24 -16
  128. package/src/ui/buttons/styles/button.js +24 -22
  129. package/src/ui/buttons/styles/color.js +118 -118
  130. package/src/ui/buttons/styles/custom.js +30 -24
  131. package/src/ui/buttons/styles/index.js +1 -1
  132. package/src/ui/buttons/styles/labels.js +17 -13
  133. package/src/ui/buttons/styles/page.js +3 -3
  134. package/src/ui/buttons/styles/responsive.js +226 -118
  135. package/src/ui/buttons/tagline.jsx +53 -54
  136. package/src/ui/chevron.jsx +27 -16
  137. package/src/ui/index.js +3 -3
  138. package/src/ui/loading.jsx +25 -18
  139. package/src/ui/text/index.js +1 -1
  140. package/src/ui/text/style.scoped.scss +25 -26
  141. package/src/ui/text/text.jsx +42 -20
  142. package/src/ui/tracking.jsx +18 -11
  143. package/src/zoid/buttons/component.jsx +836 -684
  144. package/src/zoid/buttons/container.jsx +140 -107
  145. package/src/zoid/buttons/index.js +1 -1
  146. package/src/zoid/buttons/prerender.jsx +84 -64
  147. package/src/zoid/buttons/util.js +355 -254
  148. package/src/zoid/card-fields/component.jsx +581 -549
  149. package/src/zoid/card-fields/index.js +1 -1
  150. package/src/zoid/card-fields/prerender.jsx +20 -17
  151. package/src/zoid/card-form/component.js +155 -141
  152. package/src/zoid/card-form/index.js +1 -1
  153. package/src/zoid/checkout/component.jsx +314 -282
  154. package/src/zoid/checkout/config.js +2 -2
  155. package/src/zoid/checkout/content.js +190 -154
  156. package/src/zoid/checkout/hacks.js +31 -28
  157. package/src/zoid/checkout/index.js +2 -2
  158. package/src/zoid/checkout/props.js +27 -33
  159. package/src/zoid/installments/component.jsx +83 -70
  160. package/src/zoid/installments/index.js +1 -1
  161. package/src/zoid/installments/props.js +1 -1
  162. package/src/zoid/menu/component.jsx +53 -48
  163. package/src/zoid/menu/index.js +1 -1
  164. package/src/zoid/menu/props.js +1 -3
  165. package/src/zoid/modal/component.jsx +119 -106
  166. package/src/zoid/modal/index.js +1 -1
  167. package/src/zoid/modal/props.js +1 -3
  168. package/src/zoid/payment-fields/component.jsx +215 -191
  169. package/src/zoid/payment-fields/container.jsx +73 -64
  170. package/src/zoid/payment-fields/index.js +1 -1
  171. package/src/zoid/payment-fields/prerender.jsx +16 -14
  172. package/src/zoid/payment-fields/props.js +6 -6
  173. package/src/zoid/qr-code/component.jsx +131 -115
  174. package/src/zoid/qr-code/container.jsx +74 -68
  175. package/src/zoid/qr-code/index.js +1 -1
  176. package/src/zoid/qr-code/prerender.jsx +17 -12
  177. package/src/zoid/qr-code/types.js +2 -2
  178. package/src/zoid/wallet/component.jsx +298 -260
  179. package/src/zoid/wallet/container.jsx +73 -64
  180. package/src/zoid/wallet/index.js +1 -1
  181. package/src/zoid/wallet/prerender.jsx +14 -14
  182. package/src/zoid/wallet/props.js +4 -4
  183. package/src/actions/save/index.js +0 -40
  184. package/src/interface/actions.js +0 -14
  185. package/src/lib/getLogoCDNExperiment.js +0 -25
@@ -2,269 +2,307 @@
2
2
  /** @jsx node */
3
3
  /* eslint max-lines: 0 */
4
4
 
5
- import { node, dom } from '@krakenjs/jsx-pragmatic/src';
5
+ import { node, dom } from "@krakenjs/jsx-pragmatic/src";
6
6
  import {
7
- getLogger, getPayPalDomainRegex, getSDKMeta, getPayPalDomain, getClientID, getUserAccessToken,
8
- getClientAccessToken, getUserIDToken, getLocale, getPartnerAttributionID, getCorrelationID, getSessionID,
9
- getEnv, getStageHost, getAPIStageHost, getPlatform, getCurrency, getIntent, getBuyerCountry, getCommit, getVault,
10
- getMerchantID, getCSPNonce, getDebug, getMerchantRequestedPopupsDisabled
11
- } from '@paypal/sdk-client/src';
12
- import { create, type ZoidComponent } from '@krakenjs/zoid/src';
13
- import { inlineMemoize, memoize, uniqueID } from '@krakenjs/belter/src';
14
- import { ZalgoPromise } from '@krakenjs/zalgo-promise/src';
15
- import { FUNDING } from '@paypal/sdk-constants/src';
16
- import { getRefinedFundingEligibility, rememberFunding } from '@paypal/funding-components/src';
17
-
18
- import { type WalletProps } from './props';
19
- import { WalletPrerender } from './prerender';
20
- import { WalletContainer } from './container';
7
+ getLogger,
8
+ getPayPalDomainRegex,
9
+ getSDKMeta,
10
+ getPayPalDomain,
11
+ getClientID,
12
+ getUserAccessToken,
13
+ getClientAccessToken,
14
+ getUserIDToken,
15
+ getLocale,
16
+ getPartnerAttributionID,
17
+ getCorrelationID,
18
+ getSessionID,
19
+ getEnv,
20
+ getStageHost,
21
+ getAPIStageHost,
22
+ getPlatform,
23
+ getCurrency,
24
+ getIntent,
25
+ getBuyerCountry,
26
+ getCommit,
27
+ getVault,
28
+ getMerchantID,
29
+ getCSPNonce,
30
+ getDebug,
31
+ getMerchantRequestedPopupsDisabled,
32
+ } from "@paypal/sdk-client/src";
33
+ import { create, type ZoidComponent } from "@krakenjs/zoid/src";
34
+ import { inlineMemoize, memoize, uniqueID } from "@krakenjs/belter/src";
35
+ import { ZalgoPromise } from "@krakenjs/zalgo-promise/src";
36
+ import { FUNDING } from "@paypal/sdk-constants/src";
37
+ import {
38
+ getRefinedFundingEligibility,
39
+ rememberFunding,
40
+ } from "@paypal/funding-components/src";
41
+
42
+ import { type WalletProps } from "./props";
43
+ import { WalletPrerender } from "./prerender";
44
+ import { WalletContainer } from "./container";
21
45
 
22
46
  export type WalletComponent = ZoidComponent<WalletProps>;
23
47
 
24
- export function getWalletComponent() : WalletComponent {
25
- return inlineMemoize(getWalletComponent, () => {
26
- return create({
27
- tag: 'paypal-wallet',
28
- url: () => `${ getPayPalDomain() }${ __PAYPAL_CHECKOUT__.__URI__.__WALLET__ }`,
29
- domain: getPayPalDomainRegex(),
30
-
31
- autoResize: {
32
- width: false,
33
- height: true
34
- },
35
-
36
- dimensions: {
37
- width: '100%',
38
- height: '150px'
39
- },
40
-
41
- logger: getLogger(),
42
-
43
- containerTemplate: ({ props, doc, uid, frame, prerenderFrame, event }) => {
44
- return (
45
- <WalletContainer uid={ uid } frame={ frame } prerenderFrame={ prerenderFrame } event={ event } nonce={ props.nonce } />
46
- ).render(dom({ doc }));
47
- },
48
-
49
- prerenderTemplate: ({ props, doc }) => {
50
- return (
51
- <WalletPrerender nonce={ props.nonce } />
52
- ).render(dom({ doc }));
53
- },
54
-
55
- attributes: {
56
- iframe: {
57
- scrolling: 'no'
58
- }
59
- },
60
-
61
- props: {
62
- sdkMeta: {
63
- type: 'string',
64
- queryParam: true,
65
- sendToChild: false,
66
- value: getSDKMeta
67
- },
68
-
69
- clientID: {
70
- type: 'string',
71
- queryParam: true,
72
- value: getClientID
73
- },
74
-
75
- clientAccessToken: {
76
- type: 'string',
77
- required: false,
78
- queryParam: true,
79
- value: getClientAccessToken
80
- },
81
-
82
- buyerAccessToken: {
83
- type: 'string',
84
- queryParam: true,
85
- required: false,
86
- value: getUserAccessToken
87
- },
88
-
89
- fundingSource: {
90
- type: 'string',
91
- queryParam: true,
92
- default: () => FUNDING.PAYPAL
93
- },
94
-
95
- style: {
96
- type: 'object',
97
- required: false
98
- },
99
-
100
- setupListeners: {
101
- type: 'function',
102
- required: false
103
- },
104
-
105
- createOrder: {
106
- type: 'function',
107
- queryParam: 'orderID',
108
- // $FlowFixMe
109
- queryValue: ({ value }) => ZalgoPromise.try(value),
110
- // $FlowFixMe
111
- decorate: ({ value }) => memoize(value)
112
- },
113
-
114
- onApprove: {
115
- type: 'function'
116
- },
117
-
118
- userIDToken: {
119
- type: 'string',
120
- value: getUserIDToken,
121
- required: false,
122
- queryParam: true
123
- },
124
-
125
- locale: {
126
- type: 'object',
127
- queryParam: true,
128
- value: getLocale
129
- },
130
-
131
- partnerAttributionID: {
132
- type: 'string',
133
- required: false,
134
- value: getPartnerAttributionID
135
- },
136
-
137
- merchantRequestedPopupsDisabled: {
138
- type: 'boolean',
139
- required: false,
140
- value: getMerchantRequestedPopupsDisabled
141
- },
142
-
143
- correlationID: {
144
- type: 'string',
145
- required: false,
146
- value: getCorrelationID
147
- },
148
-
149
- sessionID: {
150
- type: 'string',
151
- value: getSessionID,
152
- queryParam: true
153
- },
154
-
155
- walletSessionID: {
156
- type: 'string',
157
- value: uniqueID,
158
- queryParam: true
159
- },
160
-
161
- env: {
162
- type: 'string',
163
- queryParam: true,
164
- value: getEnv
165
- },
166
-
167
- stageHost: {
168
- type: 'string',
169
- value: getStageHost,
170
- required: false
171
- },
172
-
173
- apiStageHost: {
174
- type: 'string',
175
- value: getAPIStageHost,
176
- required: false
177
- },
178
-
179
- fundingEligibility: {
180
- type: 'object',
181
- value: getRefinedFundingEligibility,
182
- queryParam: true,
183
- serialization: 'base64'
184
- },
185
-
186
- platform: {
187
- type: 'string',
188
- queryParam: true,
189
- value: getPlatform
190
- },
191
-
192
- remember: {
193
- type: 'function',
194
- value: () => {
195
- return (fundingSources : $ReadOnlyArray<$Values<typeof FUNDING>>) => {
196
- rememberFunding(fundingSources, { cookie: false });
197
- };
198
- }
199
- },
200
-
201
- currency: {
202
- type: 'string',
203
- queryParam: true,
204
- value: getCurrency
205
- },
206
-
207
- intent: {
208
- type: 'string',
209
- queryParam: true,
210
- value: getIntent
211
- },
212
-
213
- buyerCountry: {
214
- type: 'string',
215
- queryParam: true,
216
- required: false,
217
- value: getBuyerCountry
218
- },
219
-
220
- commit: {
221
- type: 'boolean',
222
- queryParam: true,
223
- value: getCommit
224
- },
225
-
226
- vault: {
227
- type: 'boolean',
228
- queryParam: true,
229
- value: getVault
230
- },
231
-
232
- merchantID: {
233
- type: 'array',
234
- queryParam: true,
235
- value: getMerchantID
236
- },
237
-
238
- csp: {
239
- type: 'object',
240
- required: false,
241
- value: () => {
242
- return {
243
- nonce: getCSPNonce()
244
- };
245
- }
246
- },
247
-
248
- getPageUrl: {
249
- type: 'function',
250
- value: () => {
251
- return () => window.location.href;
252
- }
253
- },
254
-
255
- debug: {
256
- type: 'boolean',
257
- value: getDebug,
258
- queryParam: true
259
- },
260
-
261
- allowBillingPayments: {
262
- type: 'boolean',
263
- queryParam: true,
264
- required: false,
265
- default: () => true
266
- }
267
- }
268
- });
48
+ export function getWalletComponent(): WalletComponent {
49
+ return inlineMemoize(getWalletComponent, () => {
50
+ return create({
51
+ tag: "paypal-wallet",
52
+ url: () =>
53
+ `${getPayPalDomain()}${__PAYPAL_CHECKOUT__.__URI__.__WALLET__}`,
54
+ domain: getPayPalDomainRegex(),
55
+
56
+ autoResize: {
57
+ width: false,
58
+ height: true,
59
+ },
60
+
61
+ dimensions: {
62
+ width: "100%",
63
+ height: "150px",
64
+ },
65
+
66
+ logger: getLogger(),
67
+
68
+ containerTemplate: ({
69
+ props,
70
+ doc,
71
+ uid,
72
+ frame,
73
+ prerenderFrame,
74
+ event,
75
+ }) => {
76
+ return (
77
+ <WalletContainer
78
+ uid={uid}
79
+ frame={frame}
80
+ prerenderFrame={prerenderFrame}
81
+ event={event}
82
+ nonce={props.nonce}
83
+ />
84
+ ).render(dom({ doc }));
85
+ },
86
+
87
+ prerenderTemplate: ({ props, doc }) => {
88
+ return (<WalletPrerender nonce={props.nonce} />).render(dom({ doc }));
89
+ },
90
+
91
+ attributes: {
92
+ iframe: {
93
+ scrolling: "no",
94
+ },
95
+ },
96
+
97
+ props: {
98
+ sdkMeta: {
99
+ type: "string",
100
+ queryParam: true,
101
+ sendToChild: false,
102
+ value: getSDKMeta,
103
+ },
104
+
105
+ clientID: {
106
+ type: "string",
107
+ queryParam: true,
108
+ value: getClientID,
109
+ },
110
+
111
+ clientAccessToken: {
112
+ type: "string",
113
+ required: false,
114
+ queryParam: true,
115
+ value: getClientAccessToken,
116
+ },
117
+
118
+ buyerAccessToken: {
119
+ type: "string",
120
+ queryParam: true,
121
+ required: false,
122
+ value: getUserAccessToken,
123
+ },
124
+
125
+ fundingSource: {
126
+ type: "string",
127
+ queryParam: true,
128
+ default: () => FUNDING.PAYPAL,
129
+ },
130
+
131
+ style: {
132
+ type: "object",
133
+ required: false,
134
+ },
135
+
136
+ setupListeners: {
137
+ type: "function",
138
+ required: false,
139
+ },
140
+
141
+ createOrder: {
142
+ type: "function",
143
+ queryParam: "orderID",
144
+ // $FlowFixMe
145
+ queryValue: ({ value }) => ZalgoPromise.try(value),
146
+ // $FlowFixMe
147
+ decorate: ({ value }) => memoize(value),
148
+ },
149
+
150
+ onApprove: {
151
+ type: "function",
152
+ },
153
+
154
+ userIDToken: {
155
+ type: "string",
156
+ value: getUserIDToken,
157
+ required: false,
158
+ queryParam: true,
159
+ },
160
+
161
+ locale: {
162
+ type: "object",
163
+ queryParam: true,
164
+ value: getLocale,
165
+ },
166
+
167
+ partnerAttributionID: {
168
+ type: "string",
169
+ required: false,
170
+ value: getPartnerAttributionID,
171
+ },
172
+
173
+ merchantRequestedPopupsDisabled: {
174
+ type: "boolean",
175
+ required: false,
176
+ value: getMerchantRequestedPopupsDisabled,
177
+ },
178
+
179
+ correlationID: {
180
+ type: "string",
181
+ required: false,
182
+ value: getCorrelationID,
183
+ },
184
+
185
+ sessionID: {
186
+ type: "string",
187
+ value: getSessionID,
188
+ queryParam: true,
189
+ },
190
+
191
+ walletSessionID: {
192
+ type: "string",
193
+ value: uniqueID,
194
+ queryParam: true,
195
+ },
196
+
197
+ env: {
198
+ type: "string",
199
+ queryParam: true,
200
+ value: getEnv,
201
+ },
202
+
203
+ stageHost: {
204
+ type: "string",
205
+ value: getStageHost,
206
+ required: false,
207
+ },
208
+
209
+ apiStageHost: {
210
+ type: "string",
211
+ value: getAPIStageHost,
212
+ required: false,
213
+ },
214
+
215
+ fundingEligibility: {
216
+ type: "object",
217
+ value: getRefinedFundingEligibility,
218
+ queryParam: true,
219
+ serialization: "base64",
220
+ },
221
+
222
+ platform: {
223
+ type: "string",
224
+ queryParam: true,
225
+ value: getPlatform,
226
+ },
227
+
228
+ remember: {
229
+ type: "function",
230
+ value: () => {
231
+ return (
232
+ fundingSources: $ReadOnlyArray<$Values<typeof FUNDING>>
233
+ ) => {
234
+ rememberFunding(fundingSources, { cookie: false });
235
+ };
236
+ },
237
+ },
238
+
239
+ currency: {
240
+ type: "string",
241
+ queryParam: true,
242
+ value: getCurrency,
243
+ },
244
+
245
+ intent: {
246
+ type: "string",
247
+ queryParam: true,
248
+ value: getIntent,
249
+ },
250
+
251
+ buyerCountry: {
252
+ type: "string",
253
+ queryParam: true,
254
+ required: false,
255
+ value: getBuyerCountry,
256
+ },
257
+
258
+ commit: {
259
+ type: "boolean",
260
+ queryParam: true,
261
+ value: getCommit,
262
+ },
263
+
264
+ vault: {
265
+ type: "boolean",
266
+ queryParam: true,
267
+ value: getVault,
268
+ },
269
+
270
+ merchantID: {
271
+ type: "array",
272
+ queryParam: true,
273
+ value: getMerchantID,
274
+ },
275
+
276
+ csp: {
277
+ type: "object",
278
+ required: false,
279
+ value: () => {
280
+ return {
281
+ nonce: getCSPNonce(),
282
+ };
283
+ },
284
+ },
285
+
286
+ getPageUrl: {
287
+ type: "function",
288
+ value: () => {
289
+ return () => window.location.href;
290
+ },
291
+ },
292
+
293
+ debug: {
294
+ type: "boolean",
295
+ value: getDebug,
296
+ queryParam: true,
297
+ },
298
+
299
+ allowBillingPayments: {
300
+ type: "boolean",
301
+ queryParam: true,
302
+ required: false,
303
+ default: () => true,
304
+ },
305
+ },
269
306
  });
307
+ });
270
308
  }