He should be thanking her, because it's a smash hit!

Taylor Swift secretly wrote ex-boyfriend Calvin Harris' song "This Is What You Came For," and when the Scottish DJ took all the credit for the tune during a radio interview, that was the straw that broke the camel's back in their relationship. T-Swizz penned the chart-topping single and recorded it on her iPhone, sent it to her man, and then hit the studio with him to record it with her on vocals and him handling the beat, TMZ reports.

The former couple agreed that a collaboration would overshadow the track, so Tay Tay kept the publishing rights and used the pseudonym Nils Sjoberg as her credit. "Taylor Swift wrote "This Is What You Came For" under the pseudonym Nils Sjoberg," the singer's rep confirmed to People.

The problem came when the EDM superstar appeared on Ryan Seacrest's radio show and declared he would never work on music with the "Wildest Dreams" songstress. "Will you do a collaboration with your girlfriend?" Seacrest asked, to which Calvin responded, "You know we haven't even spoken about it. I can't see it happening though." Ouch! He could have at least said maybe!

The Grammy winner felt disrespected and it became "the breaking point in their relationship," the source claims. Just days later, the blonde beauty met now-boyfriend Tom Hiddleston at the Met Gala and kicked her ungrateful beau to the curb!

Since she still owns the rights to the song, Taylor could ban Calvin from performing it but reportedly has no plans to do so. How nice of her!

UPDATE: Calvin is PISSED! He just hopped on to his Twitter account to give his side of the story, and took more than a few catty swipes at Taylor in the process!
    "And she sings on a little bit of it too. Amazing lyric writer and she smashed it as usual. I wrote the music, produced the song, arranged it and cut the vocals though. And initially she wanted it kept secret, hence the pseudonym. Hurtful to me at this point that her and her team would go so far out of their way to try and make ME look bad at this stage though. I figure if you’re happy in your new relationship you should focus on that instead of trying to tear your ex bf down for something to do. I know you’re off tour and you need someone new to try and bury like Katy [Perry] ETC but I’m not that guy, sorry. I won’t allow it. Please focus on the positive aspects of YOUR life because you’ve earned a great one. God bless everyone have a beautiful day," he wrote.

Mixing business and pleasure never works out well!