Then you are going to have to read, in detail, your card agreement and pay attention specifically to the processing of payments, the addition of charges, and how balances subject to finance charges are calculated. If you feel they breached their contract, then you can take legal action against them.
You might also just want to call the customer service number on your statement and ask them how this could happen
