@paypal/checkout-components 5.0.231 → 5.0.232
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
|
@@ -652,7 +652,7 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => {
|
|
|
652
652
|
required: false,
|
|
653
653
|
type: 'string',
|
|
654
654
|
value: ({ props }) => {
|
|
655
|
-
const { commit, createBillingAgreement, currency, disableFunding = [], experience, fundingEligibility,
|
|
655
|
+
const { commit, createBillingAgreement, currency, disableFunding = [], experience, fundingEligibility, onComplete, style : { custom = {}, layout }, vault } = props || {};
|
|
656
656
|
|
|
657
657
|
if (experience === 'inline') {
|
|
658
658
|
return EXPERIENCE.INLINE;
|
|
@@ -670,7 +670,6 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => {
|
|
|
670
670
|
disableFunding,
|
|
671
671
|
fundingEligibility,
|
|
672
672
|
layout,
|
|
673
|
-
locale,
|
|
674
673
|
onComplete,
|
|
675
674
|
vault
|
|
676
675
|
} });
|
|
@@ -684,7 +683,7 @@ export const getButtonsComponent : () => ButtonsComponent = memoize(() => {
|
|
|
684
683
|
[ FPTI_KEY.TRANSITION ]: `inline_xo_eligibility_${ String(eligible) }`
|
|
685
684
|
}).flush();
|
|
686
685
|
|
|
687
|
-
|
|
686
|
+
return eligible ? EXPERIENCE.INLINE : '';
|
|
688
687
|
}
|
|
689
688
|
},
|
|
690
689
|
|
package/src/zoid/buttons/util.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/* @flow */
|
|
2
2
|
import { supportsPopups as userAgentSupportsPopups, isAndroid, isChrome, isIos, isIOS14, isSafari, isSFVC, type Experiment, isDevice, isTablet, getElement, isLocalStorageEnabled, isStandAlone, once } from '@krakenjs/belter/src';
|
|
3
|
-
import {
|
|
3
|
+
import { CURRENCY, ENV, FUNDING } from '@paypal/sdk-constants/src';
|
|
4
4
|
import { getEnableFunding, getLogger, createExperiment, getFundingEligibility, getPlatform, getComponents, getEnv, type FundingEligibilityType } from '@paypal/sdk-client/src';
|
|
5
5
|
import { getRefinedFundingEligibility } from '@paypal/funding-components/src';
|
|
6
6
|
|
|
@@ -293,7 +293,6 @@ type InlineCheckoutEligibilityProps = {|
|
|
|
293
293
|
disableFunding : $ReadOnlyArray<$Values<typeof FUNDING>>,
|
|
294
294
|
fundingEligibility : FundingEligibilityType,
|
|
295
295
|
layout : $Values<typeof BUTTON_LAYOUT>,
|
|
296
|
-
locale : LocaleType,
|
|
297
296
|
merchantID? : $ReadOnlyArray<string>,
|
|
298
297
|
onComplete : Function,
|
|
299
298
|
custom? : ?{|
|
|
@@ -306,12 +305,11 @@ type InlineCheckoutEligibilityProps = {|
|
|
|
306
305
|
|};
|
|
307
306
|
|
|
308
307
|
export function isInlineXOEligible({ props } : {| props : InlineCheckoutEligibilityProps |}) : boolean {
|
|
309
|
-
const { commit, currency, custom, createBillingAgreement, disableFunding, fundingEligibility, layout,
|
|
308
|
+
const { commit, currency, custom, createBillingAgreement, disableFunding, fundingEligibility, layout, onComplete, vault } = props;
|
|
310
309
|
|
|
311
310
|
const isEligible = (
|
|
312
311
|
custom?.label && custom.label.length > 0,
|
|
313
312
|
onComplete &&
|
|
314
|
-
locale.country === COUNTRY.US &&
|
|
315
313
|
commit === true &&
|
|
316
314
|
!createBillingAgreement &&
|
|
317
315
|
currency === CURRENCY.USD &&
|