From a8a4259ef1144ee166c7fa56e8caf9398fc1eb1f Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Thu, 25 Jun 2015 11:50:33 +1200 Subject: [PATCH] CRM-16417 complete transaction when result shows it succeeded --- CRM/Contribute/Form/Contribution/Confirm.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php index 9b8a8c76ca..3b82a5cd4e 100644 --- a/CRM/Contribute/Form/Contribution/Confirm.php +++ b/CRM/Contribute/Form/Contribution/Confirm.php @@ -2097,7 +2097,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr } $financialTypeID = $this->wrangleFinancialTypeID($contributionTypeId); - return CRM_Contribute_BAO_Contribution_Utils::processConfirm($this, $paymentParams, + $result = CRM_Contribute_BAO_Contribution_Utils::processConfirm($this, $paymentParams, $premiumParams, $contactID, $financialTypeID, 'contribution', @@ -2105,6 +2105,11 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr ($this->_mode == 'test') ? 1 : 0, $isPayLater ); + + if (CRM_Utils_Array::value('contribution_status_id', $result) == 1) { + civicrm_api3('contribution', 'completetransaction', array('id' => $result['contribution']->id)); + } + return $result; } } -- 2.25.1