diff --git a/src/zoid/card-fields/component.jsx b/src/zoid/card-fields/component.jsx index 349107a29..40a33828e 100644 --- a/src/zoid/card-fields/component.jsx +++ b/src/zoid/card-fields/component.jsx @@ -25,6 +25,7 @@ import { getUserIDToken, getSDKToken, getClientMetadataID, + isPayPalDomain, } from "@paypal/sdk-client/src"; import { getRefinedFundingEligibility } from "@paypal/funding-components/src"; import { @@ -90,6 +91,7 @@ type CardFieldsProps = {| onInputSubmitRequest?: () => ZalgoPromise | Object, |}, createOrder: () => ZalgoPromise | string, + createSubscription?: () => ZalgoPromise | string, createVaultSetupToken: () => ZalgoPromise, onApprove: ( {| returnUrl?: string, vaultSetupToken?: string |}, @@ -245,6 +247,14 @@ export const getCardFieldsComponent: () => CardFieldsComponent = memoize( value: ({ props }) => props.parent.props.createOrder, }, + ...(isPayPalDomain() && { + createSubscription: { + type: "function", + required: false, + value: ({ props }) => props.parent.props.createSubscription, + }, + }), + createVaultSetupToken: { type: "function", required: false, @@ -573,6 +583,13 @@ export const getCardFieldsComponent: () => CardFieldsComponent = memoize( required: false, }, + ...(isPayPalDomain() && { + createSubscription: { + type: "function", + required: false, + }, + }), + createVaultSetupToken: { type: "function", required: false,