Martinez chose to reject an offer from Aston Villa yesterday.
Whelan told Sky Sports News: "Roberto is staying, that is the great news. I had a gut feeling that he wanted to stay at Wigan.
"He is signing a new three-year contract today and obviously we have had to give him an increase in basic salary and incentives.
"But money has not been what this has been about.
"Villa will be disappointed but I am over the moon and I am sure every Wigan supporter will join me in saying it is fantastic and we're so pleased to have Roberto.
"I don't think we were really close to losing him but he has to consider his future, he is in football.
"He is going places, we all know that. Aston Villa are a bigger club and when you get a club like that wanting your services, it is something to be proud of.
"I would never have blamed him if he'd gone and would have wished him the best of luck."