Most places in Madeira do take cards, but you'll need some cash for buses, and I've heard that some of the cable cars only take cash too (the cable car from the promenade in Funchal does take cards). The small shops and cafes I visited all took cards but it's best to have some money just in case.