Hi there,
It sounds a little bit dodgy to refund and then retake the payment.
Do you have anything that provides the terms for cancellation and deposit refund?
You could contact your credit card company to say that they have taken the payment again without your permission, and see where that gets you.
Unless you immediately or previous to cancelling booked your new car through the other dealer, how could they know that you weren't having difficulties with finance and didn't magic these away inbetween cancelling and finding a better deal.
Does the other dealer have the right to find out that you subsequently bought the car from another dealer. If it is in the same group, could you potentially get this payment taken off the car you eventually purchased if you don't get a full refund.
Good Luck.
Sparky