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 »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Are the pre and post hooks called during IPN transaction?
Pages: [1]

Author Topic: Are the pre and post hooks called during IPN transaction?  (Read 975 times)

chapmanla

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.3.1
  • CMS version: Joomla 2.5.11
  • MySQL version: 5.0.95
  • PHP version: 5.2.5
Are the pre and post hooks called during IPN transaction?
November 04, 2010, 03:42:26 pm
I would like to use the pre or post hooks to modify contribution parameters after Paypal has sent a completed transaction notice via IPN.  As far as I can tell, neither of these hooks fire as part of the "complete transaction" process initiated by an IPN.  Am I correct in this?  If so, I was wondering if there is any reason not to have these hooks available as part of the IPN process.

I have been able to uses these hooks as part of a manual submission of a new contribution record, so I think I have the hooks properly written.   IF I am wrong about all of this, I would appreciate any info on where the hooks are called within the IPN process.

Thanks

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Are the pre and post hooks called during IPN transaction?
November 04, 2010, 05:34:59 pm

1. which hook are you talking about specifically?

2. what version?

3. In v3.1 and prior, we did not bootstrap drupal on bin scripts (like the IPN) and hence no hooks were called. This has been fixed in v3.2

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

chapmanla

  • I post occasionally
  • **
  • Posts: 43
  • Karma: 1
  • CiviCRM version: 4.3.1
  • CMS version: Joomla 2.5.11
  • MySQL version: 5.0.95
  • PHP version: 5.2.5
Re: Are the pre and post hooks called during IPN transaction?
November 06, 2010, 12:33:01 pm
Sorry for not providing more detailed info.  I am currently running CiviCRM 3.2.4 on Joomla 1.5.18.

I am trying to use civicrm_pre and civicrm_post hooks. 

I have been able to accomplish what I need by modifying CRM>Core>Payment>BaseIPN.php.  Using hooks rather than custom php would be a little cleaner.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Are the pre and post hooks called during IPN transaction?
November 06, 2010, 12:41:59 pm

we currently dont bootstrap joomla in bin scripts and hence no hooks are called. Would be great if you can give it a shot and add joomla bootstrap code here:

CRM/Utils/System/Joomla.php, function loadBootStrap

you can check the equivalent code for Drupal in Drupal.php

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Are the pre and post hooks called during IPN transaction?

This forum was archived on 2017-11-26.