X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FPayment.php;h=6d9bee416874947587fa17595a2163a5464a8c10;hb=df7b228fa9581f10fa2948928d5d4914b0987d55;hp=745bf1131e130f8896c66f03b2fdc8485a7a5180;hpb=0344a57a3ca6cca78809bd4c3a18ca876739f66c;p=civicrm-core.git diff --git a/CRM/Core/Payment.php b/CRM/Core/Payment.php index 745bf1131e..6d9bee4168 100644 --- a/CRM/Core/Payment.php +++ b/CRM/Core/Payment.php @@ -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($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 @@ -1143,7 +1116,6 @@ abstract class CRM_Core_Payment { 'processor_name' => @$_GET['processor_name'], 'processor_id' => @$_GET['processor_id'], 'mode' => @$_GET['mode'], - 'q' => @$_GET['q'], ) ); CRM_Utils_System::civiExit(); @@ -1168,12 +1140,13 @@ abstract class CRM_Core_Payment { */ public static function handlePaymentMethod($method, $params = array()) { if (!isset($params['processor_id']) && !isset($params['processor_name'])) { - $q = explode('/', CRM_Utils_Array::value('q', $params, '')); + $q = explode('/', CRM_Utils_Array::value(CRM_Core_Config::singleton()->userFrameworkURLVar, $_GET, '')); $lastParam = array_pop($q); if (is_numeric($lastParam)) { $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."); } }