@paypal/checkout-components 5.0.271 → 5.0.273
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.
- package/dist/button.js +1 -1
- package/dist/test/button.js +2 -0
- package/dist/test/button.js.LICENSE.txt +1 -0
- package/package.json +1 -1
- package/src/funding/paypal/config.jsx +1 -1
- package/src/funding/venmo/config.jsx +5 -3
- package/src/types.js +1 -0
- package/src/zoid/venmo/component.jsx +30 -0
- package/src/zoid/venmo/config.js +2 -2
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! Isomorphic Style Loader | MIT License | https://github.com/kriasoft/isomorphic-style-loader */
|
package/package.json
CHANGED
|
@@ -54,7 +54,7 @@ export function getPayPalConfig(): FundingSourceConfig {
|
|
|
54
54
|
} else {
|
|
55
55
|
text = content["label.installment.withoutPeriod"];
|
|
56
56
|
}
|
|
57
|
-
} else if (content && label) {
|
|
57
|
+
} else if (content && label && content[`label.${label}`]) {
|
|
58
58
|
text = content[`label.${label}`];
|
|
59
59
|
}
|
|
60
60
|
return text;
|
|
@@ -17,12 +17,14 @@ export function getVenmoConfig(): FundingSourceConfig {
|
|
|
17
17
|
return {
|
|
18
18
|
...DEFAULT_FUNDING_CONFIG,
|
|
19
19
|
|
|
20
|
-
shippingChange: false,
|
|
21
|
-
|
|
22
20
|
layouts: [BUTTON_LAYOUT.HORIZONTAL, BUTTON_LAYOUT.VERTICAL],
|
|
23
21
|
|
|
24
22
|
eligible: ({ experiment }) => {
|
|
25
|
-
if (
|
|
23
|
+
if (
|
|
24
|
+
experiment &&
|
|
25
|
+
(experiment.enableVenmo === false ||
|
|
26
|
+
experiment.venmoWebEnabled === false)
|
|
27
|
+
) {
|
|
26
28
|
return false;
|
|
27
29
|
}
|
|
28
30
|
|
package/src/types.js
CHANGED
|
@@ -35,6 +35,11 @@ import type { CheckoutPropsType } from "../checkout/props";
|
|
|
35
35
|
|
|
36
36
|
import { DEFAULT_POPUP_SIZE, HISTORY_NATIVE_POPUP_DOMAIN } from "./config";
|
|
37
37
|
|
|
38
|
+
const CHANNEL = {
|
|
39
|
+
DESKTOP: "desktop-web",
|
|
40
|
+
MOBILE: "mobile-web",
|
|
41
|
+
};
|
|
42
|
+
|
|
38
43
|
export type VenmoCheckoutComponent = ZoidComponent<CheckoutPropsType>;
|
|
39
44
|
|
|
40
45
|
export function getVenmoCheckoutComponent(): VenmoCheckoutComponent {
|
|
@@ -161,6 +166,19 @@ export function getVenmoCheckoutComponent(): VenmoCheckoutComponent {
|
|
|
161
166
|
value: getLocale,
|
|
162
167
|
},
|
|
163
168
|
|
|
169
|
+
channel: {
|
|
170
|
+
type: "string",
|
|
171
|
+
queryParam: true,
|
|
172
|
+
required: false,
|
|
173
|
+
value: () => (isDevice() ? CHANNEL.MOBILE : CHANNEL.DESKTOP),
|
|
174
|
+
},
|
|
175
|
+
|
|
176
|
+
parentDomain: {
|
|
177
|
+
type: "string",
|
|
178
|
+
queryParam: true,
|
|
179
|
+
required: true,
|
|
180
|
+
},
|
|
181
|
+
|
|
164
182
|
createOrder: {
|
|
165
183
|
type: "function",
|
|
166
184
|
queryParam: "token",
|
|
@@ -272,6 +290,18 @@ export function getVenmoCheckoutComponent(): VenmoCheckoutComponent {
|
|
|
272
290
|
return (handler) => event.on(EVENT.FOCUS, handler);
|
|
273
291
|
},
|
|
274
292
|
},
|
|
293
|
+
|
|
294
|
+
venmoWebUrl: {
|
|
295
|
+
type: "string",
|
|
296
|
+
queryParam: true,
|
|
297
|
+
required: true,
|
|
298
|
+
},
|
|
299
|
+
|
|
300
|
+
venmoWebEnabled: {
|
|
301
|
+
type: "boolean",
|
|
302
|
+
queryParam: true,
|
|
303
|
+
required: false,
|
|
304
|
+
},
|
|
275
305
|
},
|
|
276
306
|
|
|
277
307
|
dimensions: ({ props }) => {
|
package/src/zoid/venmo/config.js
CHANGED
|
@@ -12,8 +12,8 @@ export const DEFAULT_POPUP_SIZE = {
|
|
|
12
12
|
};
|
|
13
13
|
|
|
14
14
|
export const HISTORY_NATIVE_POPUP_DOMAIN: EnvConfig = {
|
|
15
|
-
[ENV.TEST]: "https://
|
|
16
|
-
[ENV.LOCAL]: "
|
|
15
|
+
[ENV.TEST]: "https://localhost.paypal.com:8443",
|
|
16
|
+
[ENV.LOCAL]: "https://localhost.paypal.com:8443",
|
|
17
17
|
[ENV.STAGE]: "https://history.paypal.com",
|
|
18
18
|
[ENV.SANDBOX]: "https://history.paypal.com",
|
|
19
19
|
[ENV.PRODUCTION]: "https://history.paypal.com",
|