Merge branch '4.6' of https://github.com/civicrm/civicrm-core
authoreileenmcnaugton <eileen@fuzion.co.nz>
Thu, 26 Nov 2015 08:11:03 +0000 (21:11 +1300)
committereileenmcnaugton <eileen@fuzion.co.nz>
Thu, 26 Nov 2015 08:11:03 +0000 (21:11 +1300)
Conflicts:
CRM/Core/Payment/AuthorizeNetIPN.php
tests/phpunit/CRM/Core/BAO/FinancialTrxnTest.php
tests/phpunit/CRM/Core/Payment/BaseIPNTest.php
tests/phpunit/CiviTest/CiviUnitTestCase.php
tests/phpunit/api/v3/ContributionPageTest.php
tests/phpunit/api/v3/ContributionTest.php
tests/phpunit/api/v3/PledgePaymentTest.php
tests/phpunit/api/v3/TaxContributionPageTest.php

1  2 
CRM/Core/Payment/AuthorizeNetIPN.php
js/crm.searchForm.js
js/jquery/jquery.dashboard.js
tests/phpunit/api/v3/ContributionPageTest.php

index 7abc07908e1047548bacb7cd8c14cec6a03a872f,9443bc683c5643fb1a565783e7b762d3f479810a..54d46c1837aa7ef558bad67af04ad9bd5d548024
@@@ -339,20 -331,27 +339,20 @@@ INNER JOIN civicrm_membership_payment m
    }
  
    /**
 -   * Check that the MDs is valid.
 -   *
 -   * Note that this only checks if it is provided.
 +   * Check and validate gateway MD5 response if present.
     *
 -   * @param array $ids
 +   * @param CRM_Core_Payment_AuthorizeNet $paymentObject
     * @param array $input
     *
-    * @return bool
+    * @throws CRM_Core_Exception
     */
 -  public function checkMD5($ids, $input) {
 -    $paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($ids['paymentProcessor'],
 -      $input['is_test'] ? 'test' : 'live'
 -    );
 -    $paymentObject = CRM_Core_Payment::singleton($input['is_test'] ? 'test' : 'live', $paymentProcessor);
 -
 +  public function checkMD5($paymentObject, $input) {
      if (!$paymentObject->checkMD5($input['MD5_Hash'], $input['trxn_id'], $input['amount'], TRUE)) {
-       CRM_Core_Error::debug_log_message("MD5 Verification failed.");
-       echo "Failure: Security verification failed<p>";
-       exit();
+       $message = "Failure: Security verification failed";
+       $log = new CRM_Utils_SystemLogger();
 -      $log->error('payment_notification', array('message' => $message, 'ids' => $ids, 'input' => $input));
++      $log->error('payment_notification', array('message' => $message, 'input' => $input));
+       throw new CRM_Core_Exception($message);
      }
-     return TRUE;
    }
  
  }
Simple merge
Simple merge