app/code/community/Adyen/Payment/Helper/Installments.php
public function getConfigValue($curr, $amount, $store = null, $ccType = "installments")
    {
        $value = $this->getInstallments($store, $ccType);

        if ($this->_isEncodedArrayFieldValue($value)) {
            $value = $this->_decodeArrayFieldValue($value);
        }

        $cur_minimal_boundary = -1;
        $resulting_freq = 1;
        foreach ($value as $row) {
            list($currency, $boundary, $frequency) = $row;
            if ($curr == $currency) {
                if ($amount <= $boundary && ($boundary <= $cur_minimal_boundary || $cur_minimal_boundary == -1)) {
                    $cur_minimal_boundary = $boundary;
                    $resulting_freq = $frequency;
                }

                if ($boundary == "" && $cur_minimal_boundary == -1) {
                    $resulting_freq = $frequency;
                }
            }
        }

        return $resulting_freq;
    }
public function getConfigValue($curr, $amount, $store = null, $ccType = "installments")
    {
        $value = $this->getInstallments($store, $ccType);

        if ($this->_isEncodedArrayFieldValue($value)) {
            $value = $this->_decodeArrayFieldValue($value);
        }

        $cur_minimal_boundary = -1;
        $resulting_freq = 1;
        foreach ($value as $row) {
            list($currency, $boundary, $frequency) = $row;
            if ($curr == $currency) {
                if ($amount <= $boundary && ($boundary <= $cur_minimal_boundary || $cur_minimal_boundary == -1)) {
                    $cur_minimal_boundary = $boundary;
                    $resulting_freq = $frequency;
                }

                if ($boundary == "" && $cur_minimal_boundary == -1) {
                    $resulting_freq = $frequency;
                }
            }
        }

        return $resulting_freq;
    }
public function getConfigValue ( $ curr , $ amount , $ store = null , $ ccType = "installments" ) { $ value = $ this -> getInstallments ( $ store , $ ccType ) ; if ( $ this -> _isEncodedArrayFieldValue ( $ value ) ) { $ value = $ this -> _decodeArrayFieldValue ( $ value ) ; } $ cur_minimal_boundary = - 1 ; $ resulting_freq = 1 ; foreach ( $ value as $ row ) { list ( $ currency , $ boundary , $ frequency ) = $ row ; if ( $ curr == $ currency ) { if ( $ amount <= $ boundary && ( $ boundary <= $ cur_minimal_boundary || $ cur_minimal_boundary == - 1 ) ) { $ cur_minimal_boundary = $ boundary ; $ resulting_freq = $ frequency ; } if ( $ boundary == "" && $ cur_minimal_boundary == - 1 ) { $ resulting_freq = $ frequency ; } } } return $ resulting_freq ; }
Retrieve maximum number for installments for given amount with config

@param int $customerGroupId
@param mixed $store
@return float|null
Retrieve maximum number for installments for given amount with config