@INSAS With the older CD codes, they worked on a different DRM system and linked with the old Origin client. If the code is valid, you will be able to use it with the EA app. You would not be able to with Steam as Steam uses different sets of codes.
If the code simply says invalid, it may be expired.
If the code says already used, or anything similar, it has been applied to an account already.
What you would have to do with this, is contact live support and have them look up the code. The forums are not the right avenue to get code issues resolved. This is where live support comes in and handles these types of issues.