How to change Thank You URL using conditions