You can buy a sweat coupling sized to repair 1/2-in. or 3/4-in. copper pipe. Cut the repair sleeve from the 12-in. repair ...
Straight copper pipe, at least 30cm long. 15 or 22mm diameter central heating pipe works well. (A hardware store may lend you a piece for a minute just to try this out) A circular neodymium magnet ...