Referring the question to Dr. Monzer Kahf , Scholar in Islamic Economics & Financial Expert, he said,

“Paying donation by using a credit card is, like other uses of credit cards, permissible with conditions. The conditions center on avoiding paying any interest on your credit card balances. This means the following:
1) you pay the balance within the grace period with no delay that causes interest to be imposed on the balance and 2) do not use the card for any transaction that charges interest on the transaction directly such as cash withdrawal from the ATM machine for most cards (there are a very few cards that do not charge on cash withdrawal).

In other words, if payment of a donation is treated like cash withdrawal, it may invoke interest and this makes it Haram. And if it does not invoke interest on the ground that it is considered like purchase of goods (most cards consider such donation payment as this), it is then permissible.
These advertisements are permissible and it is permissible to earn from them, provided you do not accept a thing that is prohibited such as advertisement of interest contracts or alcohol.”