From: Eileen McNaughton Date: Mon, 4 May 2015 09:08:36 +0000 (+1200) Subject: CRM-16357 (Backoffice contribution Form) remove assumptions about type, declaration... X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=9f5430b857c6b0027a6e29200d354140ae7f5bc7;p=civicrm-core.git CRM-16357 (Backoffice contribution Form) remove assumptions about type, declaration of fields is the way to go --- diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index ea652bd9f8..9bd51827e8 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -1108,11 +1108,9 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP $this->_params["country-{$this->_bltID}"] = $this->_params["billing_country-{$this->_bltID}"] = CRM_Core_PseudoConstant::countryIsoCode($this->_params["billing_country_id-{$this->_bltID}"]); } - if ($this->_paymentProcessor['payment_type'] & CRM_Core_Payment::PAYMENT_TYPE_CREDIT_CARD && isset($this->_paymentFields)) { - if (in_array('credit_card_exp_date', array_keys($this->_paymentFields))) { - $this->_params['year'] = CRM_Core_Payment_Form::getCreditCardExpirationYear($this->_params); - $this->_params['month'] = CRM_Core_Payment_Form::getCreditCardExpirationMonth($this->_params); - } + if (in_array('credit_card_exp_date', array_keys($this->_paymentFields))) { + $this->_params['year'] = CRM_Core_Payment_Form::getCreditCardExpirationYear($this->_params); + $this->_params['month'] = CRM_Core_Payment_Form::getCreditCardExpirationMonth($this->_params); } $this->_params['ip_address'] = CRM_Utils_System::ipAddress();