When is payment deemed to be made when payments are taken directly by a credit card company by direct debit? eg like Egg used to demand.

For example, if a direct debit is returned through lack of funds does that count as failure to pay?
Egg had a nasty habit of breaking down payments...