From cc757ab9fced53cd3d4e67bc6b15a3b1fcb714c9 Mon Sep 17 00:00:00 2001 From: eileen Date: Fri, 2 Aug 2013 08:09:22 +1200 Subject: [PATCH] CRM-12108 fix merge of intermediary commit --- CRM/Core/Payment/BaseIPN.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CRM/Core/Payment/BaseIPN.php b/CRM/Core/Payment/BaseIPN.php index b7eb02b09a..aec81aba53 100644 --- a/CRM/Core/Payment/BaseIPN.php +++ b/CRM/Core/Payment/BaseIPN.php @@ -539,9 +539,9 @@ LIMIT 1;"; // it would be good if someone added some comments or refactored this if ($contribution->id) { $contributionStatuses = CRM_Contribute_PseudoConstant::contributionStatus(NULL, 'name'); - if (isset($input['prevContribution']) && !$input['prevContribution']->is_pay_later && - $input['prevContribution']->contribution_status_id == array_search('Pending', $contributionStatuses)) { - $input['payment_processor'] = $paymentProcessorId; + if ((empty($input['prevContribution']) && $paymentProcessorId) || (!$input['prevContribution']->is_pay_later && +- $input['prevContribution']->contribution_status_id == array_search('Pending', $contributionStatuses))) { + $input['payment_processor'] = $paymentProcessorId; } $input['contribution_status_id'] = array_search('Completed', $contributionStatuses); $input['total_amount'] = $input['amount']; -- 2.25.1