You can follow those below codes to get products tax percentage magento: