CRM-16417 save trxn_id when completing status
authorEileen McNaughton <eileen@fuzion.co.nz>
Wed, 24 Jun 2015 23:59:51 +0000 (11:59 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Wed, 24 Jun 2015 23:59:51 +0000 (11:59 +1200)
CRM/Contribute/Form/Contribution/Confirm.php

index 3b82a5cd4ef0174aa2a6c9bf4b578f9b28657178..5e74ac38dd0c328436babbb5cd9f47a3b74c799e 100644 (file)
@@ -2107,7 +2107,11 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
       );
 
       if (CRM_Utils_Array::value('contribution_status_id', $result) == 1) {
-        civicrm_api3('contribution', 'completetransaction', array('id' => $result['contribution']->id));
+        civicrm_api3('contribution', 'completetransaction', array(
+          'id' => $result['contribution']->id,
+          'trxn_id' => CRM_Utils_Array::value('trxn_id', $result),
+          )
+        );
       }
       return $result;
     }