NB - Installing the Gene Braintree module will replace the Braintree module that ships with Magento 2.
composer require gene/module-braintree
The module does not work if it's placed in the app/code directory.
If you have already installed the module, you can update to the latest version using the command below
composer update gene/module-braintree
After Composer has finished downloading the module, you will need to run `php bin/magento setup:upgrade` to finalise the installation.