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) »
  • Updating a contribution
Pages: [1]

Author Topic: Updating a contribution  (Read 744 times)

heliosabc

  • I’m new here
  • *
  • Posts: 26
  • Karma: 0
  • CiviCRM version: 3.3
  • CMS version: 6
  • MySQL version: 5
  • PHP version: 5.2
Updating a contribution
March 18, 2011, 08:44:02 am
Hi!

I'm using CiviCRM 3.3 and with the drupal 6 CMS. I was wondering whether there was a function to update a contribution, like there is for contacts? Is there something I have overlooked or is there any specific reason why such a function doesn't exist?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Updating a contribution
March 18, 2011, 10:35:24 am
Yes, you can use the 'contribute_add' - or create - can't remember what it is in v2

Or, if you want your code to be future proof you can copy api.php & the v3 directory from the 3.4 install into your api folder & use

civicrm_api('Contribution','Update',$params);

In v3 you need to ensure 'id' is set. In v2 it might be 'id' or 'contribution_id' - not sure
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) »
  • Updating a contribution

This forum was archived on 2017-11-26.