[courtesy of /u/DerTagestrinker]
Go here, this is the EA support ticket request screen.
Click PS4, or whatever platform you want it on.
Click "Codes and promotions"
Click "Invalid code"
It'll ask you to type the error message in the screen. You can type whatever you want, but you might as well make it something like, "My code did not work and I preordered the game."
Choose your region.
A pop-up will ask you to log into your EA account. After you do that, it'll ask you to write a message to go with your support ticket. Make sure your email address is correct and write out the same message as before, i.e. "My code did not work and pineapple on pizza is a sin."
Submit it
Wait approximately 10 seconds
Check your email, you will receive two emails in succession, one for opening a support ticket and then one with the code.
Viola!
CREDIT TO REDDIT COMMUNITY