@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paypal/checkout-components",
3
- "version": "5.0.369",
3
+ "version": "5.0.370",
4
4
  "description": "PayPal Checkout components, for integrating checkout products.",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -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
 
@@ -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
- getVenmoExperiment,
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 = getVenmoExperiment();
78
+ const experiment = getVenmoEligibility();
79
79
  const hasShippingCallback = Boolean(
80
80
  onShippingChange || onShippingAddressChange || onShippingOptionsChange
81
81
  );
@@ -120,7 +120,7 @@ export function isSupportedNativeBrowser(): boolean {
120
120
  return false;
121
121
  }
122
122
 
123
- export function getVenmoExperiment(): EligibilityExperiment {
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 = getVenmoExperiment(),
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
- ...getVenmoExperiment(),
276
+ ...getVenmoEligibility(),
277
277
  ...getFirstRenderExperiments(),
278
278
  };
279
279
  }