Assuming they actually have the base game on their account (A Realm Reborn), it's likely either they're trying to enter codes for the wrong region (as in they created an EU account and bought an NA version of the HW expansion or vice versa) or they have a Steam account and bought the non-Steam version of the expansion (or again vice-versa)

If it is any of those then unfortunately there's nothing they can do except try and get refunds and buy the correct versions. SE won't swap codes. If it's not either of those though they'll need to contact SE to find out why (these forums are mainly for customers to help other customers, not official support)