Issue : Argument 2 passed to CommercePayment Credit Card::validate Number() must be of the type array, boolean given - Drupal - Fix
How to fix:-
Edit modules/payment/includes/commerce_payment.credit_card.inc
and apply patch.
Patch:-
function commerce_payment_validate_credit_card_number($number) {
$type = CommercePaymentCreditCard::detectType($number);
+
+ if (!$type || !is_array($type)) {
+ return FALSE;
+ }
+
return CommercePaymentCreditCard::validateNumber($number, $type);
}
function commerce_payment_validate_credit_card_security_code($number, $code) {
$type = CommercePaymentCreditCard::detectType($number);
+
+ if (!$type || !is_array($type)) {
+ return FALSE;
+ }
+
return CommercePaymentCreditCard::validateSecurityCode($code, $type);
}
Now it is fixed.
Regards.
Comments...
No comments found. Leave your reply here.