We can get the current environment type value by programmatically checking the current mode setup in the admin configuration.
There will be two possible environment types sandbox and production.
You need to create a PHP Class to render the function to fetch the current environment mode value, Continue reading “How to get current environment type value for braintree payment method using programmatically magento?”