Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge 4.7.13-rc into master #9345

Merged
merged 1 commit into from
Nov 1, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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