Using the Google recaptcha version 2 for my wordpress, I added the "localhost" domain (I tried "127.0.0.1" as well) on my google account side and I got keys but on my client-side I got this error :
ERROR: Invalid domain for site key
Is there a way to test recaptcha (version 2) on Localhost (using virtualhosts) ?
I found this solution.
Using these keys below, you can do your tests on localhost, these keys are provided in the above link for testing purposes by google:
Site key: 6LeIxAcTAAAAAJcZVRqyHh71UMIEGNQ_MXjiZKhI
Secret key: 6LeIxAcTAAAAAGG-vFI1TnRWxMZNFuojJ4WifJWe
Google adds a message on recaptcha to prevent users and the administrator that keys are just for tests.