Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@paypal/checkout-components

Package Overview
Dependencies
Maintainers
12
Versions
505
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@paypal/checkout-components - npm Package Compare versions

Comparing version 5.0.42 to 5.0.43

2

package.json
{
"name": "@paypal/checkout-components",
"version": "5.0.42",
"version": "5.0.43",
"description": "PayPal Checkout components, for integrating checkout products.",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -156,3 +156,3 @@ /* @flow */

components : $ReadOnlyArray<$Values<typeof COMPONENTS>>,
onShippingChange : ?Function
onShippingChange : ?OnShippingChange
|};

@@ -190,3 +190,3 @@

buttonSessionID : string,
onShippingChange : ?Function,
onShippingChange : ?OnShippingChange,
nonce : string

@@ -193,0 +193,0 @@ |};

@@ -8,3 +8,3 @@ /* @flow */

import { CLASS, BUTTON_NUMBER, BUTTON_LAYOUT } from '../../constants';
import { determineEligibleFunding, determineVaultedFunding } from '../../funding';
import { determineEligibleFunding, determineVaultedFunding, isVaultedFundingEligible } from '../../funding';
import { normalizeButtonProps, type ButtonPropsInputs } from '../props';

@@ -36,3 +36,6 @@

const vaultedFunding = determineVaultedFunding({ fundingEligibility, layout });
const vaultedFunding = isVaultedFundingEligible({ layout, onShippingChange })
? determineVaultedFunding({ fundingEligibility })
: [];
const { PayInstantly } = buttonContent[lang];

@@ -39,0 +42,0 @@

@@ -79,3 +79,3 @@ /* @flow */

}
// Otherwise default to show card buttons

@@ -82,0 +82,0 @@ return true;

@@ -8,2 +8,3 @@ /* @flow */

import type { FundingEligibilityType } from '../types';
import type { OnShippingChange } from '../buttons/props';

@@ -57,3 +58,15 @@ import { FUNDING_PRIORITY, getFundingConfig } from './config';

export function determineVaultedFunding({ fundingEligibility, layout } : {| fundingEligibility : FundingEligibilityType, layout : $Values<typeof BUTTON_LAYOUT> |}) :
export function isVaultedFundingEligible({ layout, onShippingChange } : { layout : $Values<typeof BUTTON_LAYOUT>, onShippingChange : ?OnShippingChange }) : boolean {
if (layout !== BUTTON_LAYOUT.VERTICAL) {
return false;
}
if (onShippingChange) {
return false;
}
return true;
}
export function determineVaultedFunding({ fundingEligibility } : {| fundingEligibility : FundingEligibilityType |}) :
$ReadOnlyArray<{ fundingSource : $Values<typeof FUNDING>, paymentMethodID : string, vendor? : $Values<typeof CARD>, label : string }> {

@@ -63,6 +76,2 @@

if (layout !== BUTTON_LAYOUT.VERTICAL) {
return vaultedFunding;
}
for (const fundingSource of values(FUNDING)) {

@@ -69,0 +78,0 @@ const fundingConfig = fundingEligibility[fundingSource];

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc