You are here

protected function CreditCardPaymentMethodBase::validateIssueNumber in Ubercart 8.4

Validates an issue number on a card.

Parameters

string $issue: The issue number.

Return value

bool TRUE if the issue number if valid, FALSE otherwise.

2 calls to CreditCardPaymentMethodBase::validateIssueNumber()
CreditCardPaymentMethodBase::cartDetails in payment/uc_credit/src/CreditCardPaymentMethodBase.php
Returns the form or render array to be displayed at checkout.
CreditCardPaymentMethodBase::cartProcess in payment/uc_credit/src/CreditCardPaymentMethodBase.php
Called when checkout is submitted with this payment method selected.

File

payment/uc_credit/src/CreditCardPaymentMethodBase.php, line 821

Class

CreditCardPaymentMethodBase
Defines a base credit card payment method plugin implementation.

Namespace

Drupal\uc_credit

Code

protected function validateIssueNumber($issue) {
  if (empty($issue) || is_numeric($issue) && $issue > 0) {
    return TRUE;
  }
  return FALSE;
}