Merge pull request #19087 from civicrm/5.32
[civicrm-core.git] / CRM / Core / Payment / BaseIPN.php
index 994ab9a53dc3b64b6a13ef6828ce047fa2b83388..2d6a7e6f11ea0700dfed461b5a1bfad7e0f50092 100644 (file)
@@ -85,10 +85,12 @@ class CRM_Core_Payment_BaseIPN {
    * @param int $paymentProcessorID
    *   Id of the payment processor ID in use.
    *
+   * @deprecated
+   *
    * @return bool
    */
   public function validateData($input, &$ids, &$objects, $required = TRUE, $paymentProcessorID = NULL) {
-
+    CRM_Core_Error::deprecatedFunctionWarning('unused');
     // Check if the contribution exists
     // make sure contribution exists and is valid
     $contribution = new CRM_Contribute_BAO_Contribution();
@@ -153,9 +155,6 @@ class CRM_Core_Payment_BaseIPN {
     $contribution = &$objects['contribution'];
     $ids['paymentProcessor'] = $paymentProcessorID;
     $success = $contribution->loadRelatedObjects($input, $ids);
-    if ($required && empty($contribution->_relatedObjects['paymentProcessor'])) {
-      throw new CRM_Core_Exception("Could not find payment processor for contribution record: " . $contribution->id);
-    }
     $objects = array_merge($objects, $contribution->_relatedObjects);
     return $success;
   }