From: eileen Date: Thu, 1 Aug 2013 20:09:22 +0000 (+1200) Subject: CRM-12108 fix merge of intermediary commit X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=cc757ab9fced53cd3d4e67bc6b15a3b1fcb714c9;p=civicrm-core.git CRM-12108 fix merge of intermediary commit --- 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'];