Skip to content

Commit 660ea8d

Browse files
PAVITHRA001paraghavendran
and
paraghavendran
authored
Adding Installments and IC2B for Card Fields (#2432)
Co-authored-by: paraghavendran <[email protected]>
1 parent 0c688c9 commit 660ea8d

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

Diff for: src/zoid/card-fields/component.jsx

+22
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,14 @@ const CARD_FIELD_TYPE = {
4646
POSTAL: "postal",
4747
};
4848

49+
type InstallmentsConfiguration = {|
50+
financingCountryCode : string,
51+
currencyCode : string,
52+
billingCountryCode : string,
53+
amount : string,
54+
includeBuyerInstallments ? : boolean
55+
|};
56+
4957
type CardFieldsProps = {|
5058
clientID: string,
5159
style?: {|
@@ -100,6 +108,11 @@ type CardFieldsProps = {|
100108
hcfSessionID: string,
101109
partnerAttributionID: string,
102110
merchantID: $ReadOnlyArray<string>,
111+
installments? : {|
112+
onInstallmentsRequested : () => InstallmentsConfiguration | ZalgoPromise<InstallmentsConfiguration>,
113+
onInstallmentsAvailable : (Object) => void,
114+
onInstallmentsError? : (Object) => void
115+
|},
103116
|};
104117

105118
type CardFieldProps = {|
@@ -423,6 +436,11 @@ export const getCardFieldsComponent: () => CardFieldsComponent = memoize(
423436
default: getUserIDToken,
424437
required: false,
425438
},
439+
installments: {
440+
type: "object",
441+
required: false,
442+
value: ({ props }) => props.parent.props.installments
443+
},
426444
},
427445
});
428446
};
@@ -701,6 +719,10 @@ export const getCardFieldsComponent: () => CardFieldsComponent = memoize(
701719
default: getUserIDToken,
702720
required: false,
703721
},
722+
installments: {
723+
type: "object",
724+
required: false,
725+
},
704726
},
705727
});
706728

0 commit comments

Comments
 (0)