-
Notifications
You must be signed in to change notification settings - Fork 575
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Add Amount to Card Fields for Improved BIN API Requests #2457
base: main
Are you sure you want to change the base?
Conversation
@@ -297,6 +297,12 @@ export const getCardFieldsComponent: () => CardFieldsComponent = memoize( | |||
value: ({ props }) => props.parent.props.locale, | |||
}, | |||
|
|||
amount: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think you also need to add this to this zoid component:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wsbrunson Should this just be a parent prop instead?
amount: { subTotal: '5.50', total: '5.00' }
has little value for other card-fields.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can't remember how this works, i think both the parent and the child need it if you are going to access it inside of CardNumberField
. If you are not accessing it in a child field though, then it would only be needed on the parent
Description
This change adds support for an amount prop in the Card Fields component, enabling more accurate BIN API requests. The amount object, containing currency and value, is passed to the card-fields component and subsequently used in the BIN API request data. When unavailable, the value defaults to 0. This enhancement eliminates the use of dummy values, improving the precision of BIN lookups.
Why are we making these changes? Include references to any related Jira tasks or GitHub Issues
https://paypal.atlassian.net/browse/DTPPCPSDK-2863
Reproduction Steps (if applicable)
Screenshots (if applicable)
Dependent Changes (if applicable)
Groups who should review (if applicable)
❤️ Thank you!