The answer technically is YES. You will waste precious production points accumulated to the turns passed. You will not get a refund on purchasing something you've partly built.
Regarding the build input and refund, the answer lies in this post.
Just tested this in a hot-seat game. Wonder fail-gold is 1 for 1. That is, you get 1 gold for every hammer input. This is a better return than the 1 gold for 4 hammers you get by building wealth.
Additionally, I checked the source code (Steam -> Tools -> Sid Meier's Civilization V SDK)
For Brave New World, in
...\steamapps\common\Sid Meier's Civilization V SDK\CvGameCoreSource\CvGameCoreDLL_Expansion2\CvCity.cpp
The relevant code block starts at line 12739 (function CvCity::doCheckProduction)
...
iProductionGold = ((iBuildingProduction * iMaxedBuildingGoldPercent) / 100);
...
thisPlayer.GetTreasury()->ChangeGold(iProductionGold);
iMaxedBuildingGoldPercent is 100, sourced from GlobalDefines.xml, for BNW found at
...\steamapps\common\sid meier's civilization v\assets\DLC\Expansion2\Gameplay\XML\GlobalDefines.xml