-
Notifications
You must be signed in to change notification settings - Fork 134
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
No event triggered if card has the same brand when number pasted #694
Comments
Hey @ruslantimofeev, thanks for writing in. I'm not sure if it makes sense to trigger validityChange, empty, or notEmpty in this specific scenario because if you go from a valid card to another valid card there is neither a change in validity, nor a change in empty/not empty. To better understand your use-case for this, what details are you hoping to get from the newly pasted card number? These events all return a state object payload with these hosted fields data for each field. This information would not change if a user pastes a different, valid card number that is the same brand. |
Hi @jplukarski , I see your point. Our use-case is when the user enters card number we get the card countryOfIssuance to display different options depending on the country. Thus, if the user pastes another valid card number of the same brand we still display the options for the previously entered card even if the pasted one is issued by other country. Perhaps, it makes sense to add a new event like cardNumberChanged, what do you think? |
@ruslantimofeev thanks for the clarification. So you listen for change events and tokenize as soon as the card number is ready and valid? That makes sense; let me know if I am mistaken. We can look into adding something like In the meantime, would listening for the For internal tracking -> 3000 |
That's correct.
Thank you
will take a look, thanks |
General information
Issue description
In our case when the user enters the card number we get the card details using tokenize method.
I noticed if the user enters e.g. a VISA card 4929122456568726 then again copy-pastes a VISA but with other number e.g. 4916052077447437 the SDK doesn't trigger any events besides focus/blur. So there is no way to understand that the user entered another card and get its details.
Can the SDK be improved to trigger validityChange or empty/notEmpty to track the field has changed the value?
The text was updated successfully, but these errors were encountered: