It's also against Canadian law to pay ransoms for kidnapping, even if you're a private citizen. (Although you'll be hard pressed to find someone who has been prosecuted for this.) The U.S. has a similar "we don't negotiate with terrorists" policy, but I'm not sure if it's explicitly illegal to send money.
Refusing to negotiate with terrorists isn’t a strategy designed to produce the best outcome in isolation. It’s to avoid providing incentives for more terrorism, despite the consequences viewed in isolation.
So “outcomes are worse if you don’t” is not relevant. Several times as many terrorism incidents with better outcomes on average is not what most people would consider effective anti-terrorism.