I'm using Braintree as default payment method for my Magento 2.2.3 store.
Sometimes, It happens that customer cannot finish checkout as his CC gets declined, when this happens I would like to get notified on email with information like what customer experienced this problem, what did he have in cart and what was order total.
As far as I understand, Magento 2 has this feature built-in but looks like it's not working properly with Braintree payment method. How could I fix this? I see that function
sendPaymentFailedEmail is called from module checkout controller named
SaveOrder.php in case of 2 errors (in 2 catch blocks), but it does not seem that Braintree error ever gets there.