I'm currently working on a project that utilizes the Adyen credit card web component (version 5.51.0).
Here's the configuration I'm using:
const configuration = {
locale: "en_US",
environment: "test",
clientKey: "test_ABCDEFG",
analytics: {
enabled: false
},
paymentMethodsResponse: myPaymentMethodsResponse,
onChange: handleOnChange,
paymentMethodsConfiguration: {
card: {
styles: styleObject,
hasHolderName: true,
holderNameRequired: false,
}
},
onFieldValid: handleFieldValidation,
};
function handleFieldValidation(data) {
// my code
}
I've noticed that the onFieldValid function doesn't seem to be working as expected. I'm wondering if this function is still operational in version 5.51.0, or if I might be implementing it incorrectly. Any insights would be greatly appreciated.
Trying to use the onFieldValid event.
The
onFieldValidshould be declared in thepaymentMethodsConfigurationfor thecardpayment method, instead of placing it at the root (global) level:Here you can find all configuration options for cards in the Drop-in integration.