How to use a custom objective function?
You can break the problem into two separate problems:


How much is a person likely to donate? That is a regression problem.
How to maximize the amount raised by the campaign after deducting the cost? That is contraine optimization problem. 


Each separate problem can be solved with existing tools without creating a custom loss function.