Different invoice template depending on payment gateway?
For a client with different payment gateways we sidestepped the issue by having different Contribution pages for each - since one was for a c4 and one for a c3 entity and used

{if $contributionPageId == X}