I have created a template using merge fields from several different objects, but some of the fields are not visible. How do I fix that
Email templates can only refer to ONE object at a time, and the email eg: if an email is sent from a Contact record, any Payment Txn or Recurring Payment field values won't be visable.
The email template needs to be sent from the specific record it's referencing.
This is also because one Contact can have multiple other object records, and the template has no way of determining which record to reference.
If you require it to refer to fields from other objects, create matching custom fields on the object you are referencing from, and update the values using formula fields or workflows. Then use this field to merge.