adyen-magento2 icon indicating copy to clipboard operation
adyen-magento2 copied to clipboard

[PW-7070] Add CNPJ to Brazilian Social Security Number validation, when payment is boleto

Open flaviosantos-dev opened this issue 1 year ago • 1 comments

Is your feature request related to a problem? Please describe. Yep. In the last step of checkout, choosing boleto payment, the validation accepts only CPF (Brazilian Social Number), and our clients sometimes uses CNPJ (when they're companies).

Describe the solution you'd like Would be nice if validator for the CPF field accept both formats (000.000.000-00 and 00.000.000/0000-00).

Describe alternatives you've considered Edit the validation rule in vendor/adyen/module-payment/view/frontend/web/js/view/checkout/validator-mixin.js, including the following mask: 00.000.000/0000-00

Additional context image

flaviosantos-dev avatar Aug 03 '22 15:08 flaviosantos-dev

Hi @flaviosans,

Thank you for proposing this enhancement and apologies for not getting back to you. We have introduced a PR with refactored regex that now supports the CNJP for Boleto payment.

What do you think of this approach, would you maybe have any suggestions?

Kind regards, Rok, Adyen

RokPopov avatar Aug 12 '22 09:08 RokPopov

Hi @flaviosans,

Closing this issue due to aforementioned PR. It will be out on the next release. If there are still issues, feel free to re-open this issue.

Regards, Jean Adyen

Morerice avatar Aug 17 '22 10:08 Morerice

Hi @flaviosans,

Thank you for proposing this enhancement and apologies for not getting back to you. We have introduced a PR with refactored regex that now supports the CNJP for Boleto payment.

What do you think of this approach, would you maybe have any suggestions?

Kind regards, Rok, Adyen

Hi, @RokPopov

The solution is perfect, and fits very well with our needs. Thanks for it!

flaviosantos-dev avatar Aug 17 '22 18:08 flaviosantos-dev