My problem is similar, but mine shows up in purchase history and in my downloads, but when I install it (and it says it successfully installs) it never shows up in the game. Then when I go back it doesn't show up in the installed items, just in downloads. As for the game not showing up in your purchase history, as Pam said unfortunately that's more of something EA will have to fix. Sounds like they may have to either reset your code or issue you another code so that it will work properly. Again, though, that's not something we can help with, though we'd like to
I really hope you get the issues resolved! Good luck and keep us posted.
EDIT: You said you typed in the code, correct? Did you happen to refresh or leave the page before you clicked the download button?