From: Andrew Hunt Date: Mon, 21 Mar 2016 22:20:19 +0000 (-0400) Subject: CRM-18107 PayPal Standard IPN fails if payment processor id != payment processor... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=a595a8f98156e4e15c7fae17a334524554587c19;p=civicrm-core.git CRM-18107 PayPal Standard IPN fails if payment processor id != payment processor type id --- diff --git a/CRM/Core/Payment/PayPalIPN.php b/CRM/Core/Payment/PayPalIPN.php index 371ba571a3..89b6033897 100644 --- a/CRM/Core/Payment/PayPalIPN.php +++ b/CRM/Core/Payment/PayPalIPN.php @@ -321,11 +321,17 @@ class CRM_Core_Payment_PayPalIPN extends CRM_Core_Payment_BaseIPN { $ids['onbehalf_dupe_alert'] = self::retrieve('onBehalfDupeAlert', 'Integer', 'GET', FALSE); } - $paymentProcessorID = CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_PaymentProcessorType', - 'PayPal_Standard', 'id', 'name' + $processorParams = array( + 'user_name' => self::retrieve('receiver_email', 'String', 'POST', FALSE), + 'payment_processor_type_id' => CRM_Core_DAO::getFieldValue('CRM_Financial_DAO_PaymentProcessorType', 'PayPal_Standard', 'id', 'name'), + 'is_test' => empty($input['is_test']) ? 0 : 1, ); + $processorInfo = array(); + if (!CRM_Financial_BAO_PaymentProcessor::retrieve($processorParams, $processorInfo)) { + return FALSE; + } - if (!$this->validateData($input, $ids, $objects, TRUE, $paymentProcessorID)) { + if (!$this->validateData($input, $ids, $objects, TRUE, $processorInfo['id'])) { return FALSE; }