Check the back of your card for logos for CIRRUS or VISA. If there is no logo, it wont connect to Mastercard/VISA network which in return wont connect to the bank.
When I travel to Brasil, I've always used my debit card (issued by VISA). Looks like this:
https://www.cibc.com/ca/img/how-to-b...a-debit-en.jpg
Unfortunately, not much you can do now until you get a new card.