CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Customizing sending an email for contribution
Pages: [1]

Author Topic: Customizing sending an email for contribution  (Read 579 times)

xavier

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4453
  • Karma: 161
    • Tech To The People
  • CiviCRM version: yes probably
  • CMS version: drupal
Customizing sending an email for contribution
June 08, 2012, 01:51:55 am
Hi,

I need to send a receipt when a contribution has been paid (either when the payment provider confirmed the payment, or when receiving the check).

This is for tax reduction purpose, in France you can deduce 2/3 of the amount you give to a registered NGO (lots of rules and limits, but  that's the idea). the NGO has to send to the contributors that request it a specific pdf mentioning the amount and so on.

We have implemented it using the pdf letter templating system and some custom token, but not sure what's the best way to send it.

What would you suggest?

I'm thinking of using the send confirmation feature ( CRM/Core/BAO/MessageTemplates.php ) but I don't see any hook to alter the way the pdf is generated.  Would it make sense to add one?

The other hook I can think of is on the alterMailParams, but it doesn't seem that the param contains the "type" of email, eg. so that's easy to see if it's a contribution receipt, civimail...

Any suggestion on how to do it?

Also, is there a suggestion on how to test the payment provider callback? I'd want to generate a unique receipt id (following a different number schema than the contrib id) there, but so far I didn't manage to catch it on a post hook.

Is there a clever way of testing/debugging that part?

X+

-Hackathon and data journalism about the European parliament 24-26 jan. Watch out the result

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Customizing sending an email for contribution

This forum was archived on 2017-11-26.