projects
/
civicrm-core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2243fe9
)
CRM-14950 exit on completetransaction is already completed
author
Eileen McNaughton
<eileen@fuzion.co.nz>
Mon, 7 Jul 2014 12:11:35 +0000
(
00:11
+1200)
committer
Eileen McNaughton
<eileen@fuzion.co.nz>
Mon, 7 Jul 2014 12:11:35 +0000
(
00:11
+1200)
api/v3/Contribution.php
patch
|
blob
|
blame
|
history
diff --git
a/api/v3/Contribution.php
b/api/v3/Contribution.php
index cd9f8f79d317a59fce43b5878749053889b40660..37fbc9468732995ed24b03a67a7cf479a5e343df 100644
(file)
--- a/
api/v3/Contribution.php
+++ b/
api/v3/Contribution.php
@@
-376,6
+376,9
@@
function civicrm_api3_contribution_completetransaction(&$params) {
if(!$contribution->loadRelatedObjects($input, $ids, FALSE, TRUE)){
throw new API_Exception('failed to load related objects');
}
+ elseif ($contribution['contribution_status_id'] == CRM_Core_OptionGroup::getValue('contribution_status', 'Completed', 'name')) {
+ throw new API_Exception(ts('Contribution already completed'));
+ }
$objects = $contribution->_relatedObjects;
$objects['contribution'] = &$contribution;
$input['component'] = $contribution->_component;