Details
-
Type: Task
-
Status: Done/Fixed
-
Priority: Critical
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.6
-
Fix Version/s: 4.7.5
-
Component/s: CiviContribute, CiviCRM API, Core CiviCRM
-
Labels:
-
Documentation Required?:Developer Doc
-
Funding Source:Contributed Code
Description
Create a high level, thick API for a virtual 'payment' object. Initially this API will support calls from extensions and non-CiviCRM code, which is the scope of this issue
Eventually the intent is to refactor the front end and back end forms for contributions and memberships, event, and pledge payments so that they use it exclusively for the purposes of managing payments. This refactoring is out of scope for this issue.
The payment API will encapsulate posting appropriate records into civicrm_financial_item, civicrm_financial_trxn, and civicrm_entity_financial_trxn tables, and updating records as appropriate in civicrm_contribution and civicrm_line_item tables for payments. It will support adding a payment, changing a payment, and cancelling a payment. It will rely on permissions for the lower level API to determine if these actions are permissible for the calling user.
See api spec at http://wiki.civicrm.org/confluence/display/CRM/Payment+API
When a payment means an object like a memberships or event tickets becomes or is no longer completely paid, then appropriate changes are made to that object, and user notifications are sent as appropriate.
NB: civicrm_contribution.is_pay_later is set true for back office contribution create for status pending, but then set false when the status is set to completed. As a result it is not available to help determine if a set of civicrm_financial_trxn records are the result of a pay later contribution.
Attachments
Issue Links
- supplements
-
CRM-17751 Add field for refund_trxn_id to contribution edit form & api
- Done/Fixed
- links to