From 69a2b0bc17149a17b64ae74e5b5f77ce05f875ed Mon Sep 17 00:00:00 2001 From: Alan Dixon Date: Thu, 29 Sep 2016 14:54:37 -0400 Subject: [PATCH] CRM-16923: find the payment processor id from the recurring record (#9097) * CRM-16923: find the payment processor id from the recurring record * CRM-16923 Get the recur id in a more reliable way --- api/v3/Contribution.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/api/v3/Contribution.php b/api/v3/Contribution.php index be9656c681..209252d809 100644 --- a/api/v3/Contribution.php +++ b/api/v3/Contribution.php @@ -568,6 +568,10 @@ function civicrm_api3_contribution_repeattransaction(&$params) { 'A valid original contribution ID is required', 'invalid_data'); } $original_contribution = clone $contribution; + $input['payment_processor_id'] = civicrm_api3('contributionRecur', 'getvalue', array( + 'return' => 'payment_processor_id', + 'id' => $contribution->contribution_recur_id, + )); try { if (!$contribution->loadRelatedObjects($input, $ids, TRUE)) { throw new API_Exception('failed to load related objects'); -- 2.25.1