Merge pull request #9599 from colemanw/CRM-19812
[civicrm-core.git] / CRM / Core / Payment.php
index 2bc31161005244981249f9eb35d4b8065017bf07..6d9bee416874947587fa17595a2163a5464a8c10 100644 (file)
@@ -47,33 +47,6 @@ abstract class CRM_Core_Payment {
    */
   protected $_component;
 
-  /**
-   * Parameters to append to the notify url.
-   *
-   * The notify url is passed to the payment processor and the processor uses it for return ping backs or redirection.
-   *
-   * @var array
-   */
-  protected $notifyUrlParameters = array();
-
-  /**
-   * Get notify url parameters.
-   *
-   * @return array
-   */
-  public function getNotifyUrlParameters() {
-    return $this->notifyUrlParameters;
-  }
-
-  /**
-   * Set notify url parameters.
-   *
-   * @param array $notifyUrlParameters
-   */
-  public function setNotifyUrlParameters($notifyUrlParameters) {
-    $this->notifyUrlParameters = $notifyUrlParameters;
-  }
-
   /**
    * How are we getting billing information.
    *
@@ -393,7 +366,7 @@ abstract class CRM_Core_Payment {
   public function validatePaymentInstrument($values, &$errors) {
     CRM_Core_Form::validateMandatoryFields($this->getMandatoryFields(), $values, $errors);
     if ($this->_paymentProcessor['payment_type'] == 1) {
-      CRM_Core_Payment_Form::validateCreditCard($this->_paymentProcessor['id'], $values, $errors);
+      CRM_Core_Payment_Form::validateCreditCard($values, $errors, $this->_paymentProcessor['id']);
     }
   }
 
@@ -993,7 +966,7 @@ abstract class CRM_Core_Payment {
   protected function getNotifyUrl() {
     $url = CRM_Utils_System::url(
       'civicrm/payment/ipn/' . $this->_paymentProcessor['id'],
-      $this->getNotifyUrlParameters(),
+      array(),
       TRUE,
       NULL,
       FALSE
@@ -1173,6 +1146,7 @@ abstract class CRM_Core_Payment {
         $params['processor_id'] = $_GET['processor_id'] = $lastParam;
       }
       else {
+        self::logPaymentNotification($params);
         throw new CRM_Core_Exception("Either 'processor_id' (recommended) or 'processor_name' (deprecated) is required for payment callback.");
       }
     }