Skip to content

Commit

Permalink
Merge pull request #9345 from civicrm/4.7.13-rc
Browse files Browse the repository at this point in the history
Merge 4.7.13-rc into master
  • Loading branch information
colemanw authored Nov 1, 2016
2 parents 95c8353 + 06051ca commit cf159f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion CRM/Core/Payment.php
Original file line number Diff line number Diff line change
Expand Up @@ -366,7 +366,7 @@ public function getPreApprovalDetails($storedDetails) {
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']);
}
}

Expand Down
4 changes: 2 additions & 2 deletions CRM/Core/Payment/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,11 @@ public static function setDefaultValues(&$form, $contactID) {
* Make sure that credit card number and cvv are valid.
* Called within the scope of a QF formRule function
*
* @param int $processorID
* @param array $values
* @param array $errors
* @param int $processorID
*/
public static function validateCreditCard($processorID = NULL, $values, &$errors) {
public static function validateCreditCard($values, &$errors, $processorID = NULL) {
if (!empty($values['credit_card_type']) || !empty($values['credit_card_number'])) {
if (!empty($values['credit_card_type'])) {
$processorCards = CRM_Financial_BAO_PaymentProcessor::getCreditCards($processorID);
Expand Down
2 changes: 1 addition & 1 deletion CRM/Core/Payment/PayPalImpl.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ protected function supportsRecurContributionsForPledges() {
*/
public function validatePaymentInstrument($values, &$errors) {
if ($this->_paymentProcessor['payment_processor_type'] == 'PayPal' && !$this->isPaypalExpress($values)) {
CRM_Core_Payment_Form::validateCreditCard($this->_paymentProcessor['id'], $values, $errors);
CRM_Core_Payment_Form::validateCreditCard($values, $errors, $this->_paymentProcessor['id']);
CRM_Core_Form::validateMandatoryFields($this->getMandatoryFields(), $values, $errors);
}
}
Expand Down

0 comments on commit cf159f0

Please sign in to comment.