Contribution APIs
civicrm_contribution_add( &$params )
Availability: v1.8
Add or update the contribution
Parameters:
- 'params' (array) array of name-value for contribution
- for updating contribution record pass contribution id in array like $params['id']
Returns:
- (array) id of created/updated contribution on success, error message otherwise
civicrm_contribution_get( $params )
Availability: v1.8
Retrieve a specific contribution, given a set of input params
If more than one contribution exists, return an error, unless the client has requested to return the first found contact (set 'returnFirst' to true in $params array)
If you want to particular return properties rather than default return properties, pass 'return.propertyname => 1' in params array
Parameters:
- 'params' (array) Array of name-value for contribution
Returns:
- array of contribution values
civicrm_contribution_delete( $params )
Availability: v1.8
Delete a specified contribution.
Parameters:
- Array containing contribution_id
Returns:
- success message if successful, error message otherwise
civicrm_contribution_search( $params )
Availability: v1.8
Retrieve a set of contributions, given a set of input params
You can optionally put sort, offset, rowCount in params array
The rowCount parameter is set to 25 by default, so if you want the possibility of more than 25 Contributions to be returned by this function, you have to set this parameter
If you want particular return properties rather than default return properties, pass 'return.propertyname => 1' in params array
Parameters:
- 'params' (array) input parameters for search.
Returns:
- Array of all found contributions
- If empty array is passed to the function