@paypal/checkout-components 5.0.369 → 5.0.370
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 +1 -1
- package/package.json +1 -1
- package/src/funding/venmo/config.jsx +2 -12
- package/src/marks/component.jsx +2 -2
- package/src/zoid/buttons/util.js +3 -3
package/package.json
CHANGED
|
@@ -22,17 +22,7 @@ export function getVenmoConfig(): FundingSourceConfig {
|
|
|
22
22
|
layouts: [BUTTON_LAYOUT.HORIZONTAL, BUTTON_LAYOUT.VERTICAL],
|
|
23
23
|
|
|
24
24
|
eligible: ({ experiment, shippingChange, displayOnly, flow }) => {
|
|
25
|
-
|
|
26
|
-
* enableVenmo checks native browser compatibility and ramp
|
|
27
|
-
* ignore above compatibility if forcing to web
|
|
28
|
-
*/
|
|
29
|
-
if (
|
|
30
|
-
experiment &&
|
|
31
|
-
experiment.enableVenmo === false &&
|
|
32
|
-
experiment.venmoWebEnabled !== true &&
|
|
33
|
-
experiment.isWebViewEnabled !== true &&
|
|
34
|
-
experiment.venmoEnableWebOnNonNativeBrowser !== true
|
|
35
|
-
) {
|
|
25
|
+
if (experiment?.enableVenmo === false) {
|
|
36
26
|
return false;
|
|
37
27
|
}
|
|
38
28
|
|
|
@@ -74,7 +64,7 @@ export function getVenmoConfig(): FundingSourceConfig {
|
|
|
74
64
|
}
|
|
75
65
|
|
|
76
66
|
return {
|
|
77
|
-
popup: true,
|
|
67
|
+
popup: experiment?.isWebViewEnabled ? false : true,
|
|
78
68
|
};
|
|
79
69
|
},
|
|
80
70
|
|
package/src/marks/component.jsx
CHANGED
|
@@ -32,7 +32,7 @@ import { BUTTON_LAYOUT, BUTTON_FLOW } from "../constants";
|
|
|
32
32
|
import { determineEligibleFunding, isFundingEligible } from "../funding";
|
|
33
33
|
import {
|
|
34
34
|
isSupportedNativeBrowser,
|
|
35
|
-
|
|
35
|
+
getVenmoEligibility,
|
|
36
36
|
} from "../zoid/buttons/util";
|
|
37
37
|
|
|
38
38
|
import { MarksElement } from "./template";
|
|
@@ -75,7 +75,7 @@ export const getMarksComponent: () => MarksComponent = memoize(() => {
|
|
|
75
75
|
: false;
|
|
76
76
|
const supportsPopups = userAgentSupportsPopups();
|
|
77
77
|
const supportedNativeBrowser = isSupportedNativeBrowser();
|
|
78
|
-
const experiment =
|
|
78
|
+
const experiment = getVenmoEligibility();
|
|
79
79
|
const hasShippingCallback = Boolean(
|
|
80
80
|
onShippingChange || onShippingAddressChange || onShippingOptionsChange
|
|
81
81
|
);
|
package/src/zoid/buttons/util.js
CHANGED
|
@@ -120,7 +120,7 @@ export function isSupportedNativeBrowser(): boolean {
|
|
|
120
120
|
return false;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
export function
|
|
123
|
+
export function getVenmoEligibility(): EligibilityExperiment {
|
|
124
124
|
const fundingEligibility = getFundingEligibility();
|
|
125
125
|
const enableFunding = getEnableFunding();
|
|
126
126
|
|
|
@@ -150,7 +150,7 @@ export function getRenderedButtons(
|
|
|
150
150
|
style = {},
|
|
151
151
|
enableFunding = getEnableFunding(),
|
|
152
152
|
fundingEligibility = getRefinedFundingEligibility(),
|
|
153
|
-
experiment =
|
|
153
|
+
experiment = getVenmoEligibility(),
|
|
154
154
|
applePaySupport,
|
|
155
155
|
supportsPopups = userAgentSupportsPopups(),
|
|
156
156
|
supportedNativeBrowser = isSupportedNativeBrowser(),
|
|
@@ -273,7 +273,7 @@ export function applePaySession(): ?ApplePaySessionConfigRequest {
|
|
|
273
273
|
|
|
274
274
|
export function getButtonExperiments(): EligibilityExperiment {
|
|
275
275
|
return {
|
|
276
|
-
...
|
|
276
|
+
...getVenmoEligibility(),
|
|
277
277
|
...getFirstRenderExperiments(),
|
|
278
278
|
};
|
|
279
279
|
}
|