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) »
  • Api process for creating paid participant record
Pages: [1]

Author Topic: Api process for creating paid participant record  (Read 427 times)

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Api process for creating paid participant record
July 01, 2013, 03:19:32 pm
I recently tried to create a participant record that was linked to a contribution. This was part of a test set-up but seems like a common 'wild' api usage & I found it problematic & have concerns for people with code that has been working pre-4.3 getting a hidden but undesirable result.

My efforts / notes are here

http://issues.civicrm.org/jira/browse/CRM-12984?focusedCommentId=51606&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-51606

I'm not terribly keen on the fact that line items link directly to participant records (rather than via contributions) but that aside I feel it should be easier than the above to correctly create this construct. It goes without saying that the logic should live in the BAO layer not the api layer.

Perhaps BAO_Contribution:create should accept params like 'participant_id', 'membership_id' & if passed in it should create line items off them (as appropriate) & also create the participant payment record?

Thoughts?
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) »
  • Api process for creating paid participant record

This forum was archived on 2017-11-26.