Skip to content

Commit 71e09fa

Browse files
jtanya17Tanya Jain
andauthored
Feat: Add Amount to Card Fields for Improved BIN API Requests (#2457)
* Add Amount to Card Fields * Set amount queryParam as false * Add amount prop to card fields component * Add amount to Zoid * Remove queryParam: false attribute from amount object * Add amount to CardFieldsProps --------- Co-authored-by: Tanya Jain <tanyjain@paypal.com>
1 parent 08435cd commit 71e09fa

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/zoid/card-fields/component.jsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ type CardFieldsProps = {|
7777
fundingEligibility: FundingEligibilityType,
7878
disableCard?: $ReadOnlyArray<$Values<typeof CARD>>,
7979
currency: $Values<typeof CURRENCY>,
80+
amount: string,
8081
intent: $Values<typeof INTENT>,
8182
commit: boolean,
8283
vault: boolean,
@@ -297,6 +298,12 @@ export const getCardFieldsComponent: () => CardFieldsComponent = memoize(
297298
value: ({ props }) => props.parent.props.locale,
298299
},
299300

301+
amount: {
302+
type: "object",
303+
value: ({ props }) => props.parent.props.amount,
304+
required: false,
305+
},
306+
300307
onApprove: {
301308
type: "function",
302309
required: false,
@@ -639,6 +646,11 @@ export const getCardFieldsComponent: () => CardFieldsComponent = memoize(
639646
value: getLocale,
640647
},
641648

649+
amount: {
650+
type: "object",
651+
required: false,
652+
},
653+
642654
onApprove: {
643655
type: "function",
644656
required: false,

0 commit comments

Comments
 (0)