I ran into an issue implementing reCaptcha on my website, after making several updates and changes to my architecture. The problem was the reCaptcha was always failing, even after every successful submission. In order to figure out the problem, I put the following code in the submit method of the Drupal7Post class.
PHP
Note: This technique also works for other versions, just change the version number. For example, if you want to to install PHP5.6 or PHP7.3. Just change the version number wherever it appears, such as php56-apache2handler or php73-mysql.
Another tut that I found helpful, https://trac.macports.org/wiki/howto/MAMP