It happened with me as well, but money was not deducted at all, first time I thought when the bank will confirm the payment, the ticket will get booked at that moment, hence checked with IRCTC helpline, as I don't think there is an option to cancel at this moment, as it has not been booked yet. They suggested to book another ticket, I had time and there was enough vacancy so I booked another the next day, money was never deducted.