From: eileenmcnaughton Date: Wed, 29 Jul 2015 08:05:42 +0000 (+0000) Subject: CRM-16923 accept payment_processor_id as a completetransaction param X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=07b464784b323c45824c8aa7a71aaa4d607b829e;p=civicrm-core.git CRM-16923 accept payment_processor_id as a completetransaction param --- diff --git a/api/v3/Contribution.php b/api/v3/Contribution.php index 121a1d82e2..20cc1aedc7 100644 --- a/api/v3/Contribution.php +++ b/api/v3/Contribution.php @@ -410,6 +410,9 @@ function _civicrm_api3_contribution_sendconfirmation_spec(&$params) { function civicrm_api3_contribution_completetransaction(&$params) { $input = $ids = array(); + if (isset($params['payment_processor_id'])) { + $input['payment_processor_id'] = $params['payment_processor_id']; + } $contribution = new CRM_Contribute_BAO_Contribution(); $contribution->id = $params['id']; $contribution->find(TRUE); @@ -460,6 +463,12 @@ function _civicrm_api3_contribution_completetransaction_spec(&$params) { 'description' => '. If not provided this will default to domain mail or contribution page', 'type' => CRM_Utils_Type::T_STRING, ); + + $params['payment_processor_id'] = array( + 'title' => 'Payment processor ID', + 'description' => '. Providing this is strongly recommended, as not possible to calculate it accurately always', + 'type' => CRM_Utils_Type::T_INT, + ); } /**