Adyen / adyen-web

Adyen Web Drop-in and Components
https://docs.adyen.com/online-payments
MIT License
185 stars 131 forks source link

Masks for Brazilian SSN (CPF and CNPJ) fields #1741

Closed flaviosdev closed 2 years ago

flaviosdev commented 2 years ago

Describe the bug In the last step, when we have to fill the ssn field with brazilian CPF or CNPJ, the field is not masked. Even if correctly filled by user, with no mask, the validator rejects because of format, with no dots or slashes. If user inserts the mask manually, everything goes well.

To Reproduce Steps to reproduce the behavior:

In the last step of checkout, choose the 'boleto' option; Fill in the 'CPF/CNPJ' field with a valid CPF or CNPJ; Place Order; Expected Behavior Order placed with success

Screenshots

image Valid CNPJ being rejected because has no mask.

Additional context We need only apply the mask, to the entered number 12345678912 become 123.456.789-12 (for CNPJ) or the number 12345678123456 become 12.345.678/1234-56, for example. The Module already has further validation for authenticity of this data.

ribeiroguilherme commented 2 years ago

Hey @flaviosans ,

Which version of adyen-web SDK is this?

The screenshot that you attached doesn't look like it is from our SDK. Our checkout isn't multi-step, and also we provide validation for the CPF field. You can check it out on our demo store by selecting Brazil as country.

ribeiroguilherme commented 2 years ago

Closing this issue for now due to its inactivity and as it seems to not be related to our SDK.