source/Core/InputValidator.php
public function validatePaymentInputData($paymentId, & $dynamicValue)
    {
        $validationResult = true;

        switch ($paymentId) {
            case 'oxidcreditcard':
                $validationResult = false;

                $idAllCreditCardInformationSet = $this->_isAllBankInformationSet($this->_aRequiredCCFields, $dynamicValue);
                $doesCreditCardTypeExist = in_array($dynamicValue['kktype'], $this->_aPossibleCCType);

                if ($idAllCreditCardInformationSet && $doesCreditCardTypeExist) {
                    $cardValidator = oxNew(\OxidEsales\Eshop\Core\CreditCardValidator::class);
                    $validationResult = $cardValidator->isValidCard(
                        $dynamicValue['kknumber'],
                        $dynamicValue['kktype'],
                        $dynamicValue['kkmonth'] . substr($dynamicValue['kkyear'], 2, 2)
                    );
                }
                break;

            case "oxiddebitnote":
                $validationResult = false;

                if ($this->_isAllBankInformationSet($this->_aRequiredDCFields, $dynamicValue)) {
                    $validationResult = $this->_validateDebitNote($dynamicValue);
                }

                break;
        }

        return $validationResult;
    }
public function validatePaymentInputData($paymentId, & $dynamicValue)
    {
        $validationResult = true;

        switch ($paymentId) {
            case 'oxidcreditcard':
                $validationResult = false;

                $idAllCreditCardInformationSet = $this->_isAllBankInformationSet($this->_aRequiredCCFields, $dynamicValue);
                $doesCreditCardTypeExist = in_array($dynamicValue['kktype'], $this->_aPossibleCCType);

                if ($idAllCreditCardInformationSet && $doesCreditCardTypeExist) {
                    $cardValidator = oxNew(\OxidEsales\Eshop\Core\CreditCardValidator::class);
                    $validationResult = $cardValidator->isValidCard(
                        $dynamicValue['kknumber'],
                        $dynamicValue['kktype'],
                        $dynamicValue['kkmonth'] . substr($dynamicValue['kkyear'], 2, 2)
                    );
                }
                break;

            case "oxiddebitnote":
                $validationResult = false;

                if ($this->_isAllBankInformationSet($this->_aRequiredDCFields, $dynamicValue)) {
                    $validationResult = $this->_validateDebitNote($dynamicValue);
                }

                break;
        }

        return $validationResult;
    }
public function validatePaymentInputData ( $ paymentId , & $ dynamicValue ) { $ validationResult = true ; switch ( $ paymentId ) { case 'oxidcreditcard' : $ validationResult = false ; $ idAllCreditCardInformationSet = $ this -> _isAllBankInformationSet ( $ this -> _aRequiredCCFields , $ dynamicValue ) ; $ doesCreditCardTypeExist = in_array ( $ dynamicValue [ 'kktype' ] , $ this -> _aPossibleCCType ) ; if ( $ idAllCreditCardInformationSet && $ doesCreditCardTypeExist ) { $ cardValidator = oxNew ( \ OxidEsales \ Eshop \ Core \ CreditCardValidator :: class ) ; $ validationResult = $ cardValidator -> isValidCard ( $ dynamicValue [ 'kknumber' ] , $ dynamicValue [ 'kktype' ] , $ dynamicValue [ 'kkmonth' ] . substr ( $ dynamicValue [ 'kkyear' ] , 2 , 2 ) ) ; } break ; case "oxiddebitnote" : $ validationResult = false ; if ( $ this -> _isAllBankInformationSet ( $ this -> _aRequiredDCFields , $ dynamicValue ) ) { $ validationResult = $ this -> _validateDebitNote ( $ dynamicValue ) ; } break ; } return $ validationResult ; }
Validates payment input data for credit card and debit note.

@param string $paymentId    The payment id of current payment.
@param array  $dynamicValue Values of payment.

@return bool
Validates payment input data for credit card and debit note .