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) »
  • Pledge Payments & hooks
Pages: [1]

Author Topic: Pledge Payments & hooks  (Read 622 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Pledge Payments & hooks
August 31, 2010, 01:36:47 pm
Hi,

I want to use some custom fields set at the pledge level to calculate some custom fields at the contribution level when the money is receipted (commission in this case). Contributions May be receipted by recurring paypal IPN transactions

Lobo suggested I use hook civicrm_post on the contribute object. The problem I found is that the pledge id relating to the contribution is not passed to the hook and the record in civicrm_pledge_payment has not yet been created to query.

I tried to look at whether I could set the pledge payment object to call the hook but the routine which would need to call it is a static routine and doesn't hold an object to pass out to the hook (updatepledgepaymentstatus).

Would it be reasonable to add a new updatepledgepaymentstatus hook or what other approach makes sense here?
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

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: Pledge Payments & hooks
August 31, 2010, 02:24:00 pm

hmm, how are the recurring contributions connected to pledges? not sure i see the connection in the system currently

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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Pledge Payments & hooks
August 31, 2010, 03:59:05 pm
Oh - I hadn't fully tested but I assumed that because you could set up a contribution page with pledges & recurring paypal contributions you would get recurring credit card contributions
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • APIs and Hooks (Moderator: Donald Lobo) »
  • Pledge Payments & hooks

This forum was archived on 2017-11-26.