If you want to use this for a clip-type mechanic, you can stop a units attack by giving it a disabled spellbook containing "orc burrow" and "cargo hold". This is a much better solution than constantly giving the unit stop orders, since it will disable it's attack altogether and not try to reaquire the target. Just make a copy of the "spellbook" ability, put the mentioned abilities in it, and disable it using triggers for all players. This way, it will not show up in the command card, yet the effect still applies due to a bug in warcraft.
As for substracting gold, the easy way is to use a "unit is attacked" event and subtract gold from "owner of attacking unit". This is not a completely safe method however, since the event will fire wether the unit completes the attack or not. There is a delay between when a unit starts the attack animation and when it deals damage, and there is a chance that the unit will die or recieve another order within that short span.
The hard way is something similar to what Wietlol is suggesting. If you're not planning to have a huge number of units in your map, you can get away with making your own lazy-mans damage detection system and ignore event leaks, as they are neglible. In that case, you just have a single trigger with no events, which deals with when a unit takes damage. Whenever a unit enters the map, you add the event "entered unit takes damage" to the trigger. Then, you do something similar to what Wietlol suggested. You don't need to actually stop the damage, instead you can use a special attack type for all ranged units, which has its damage tables set to zero in the gameplay constants. That way the damage will display correctly, yet not apply to the target. If you want, you can even use this to make your own simple missile system, which could be kinda cool.