In such a case railways permits a full refund, you will have to file an online TDR in order to apply for a refund (TDR can be filed through this link https://goibibo.typeform.com/to/YdKv2g).