lib/omise/OmiseCapabilities.php
public function makeBackendFilterChargeAmount($amount)
    {
        $defMin = $this['limits']['charge_amount']['min'];
        $defMax = $this['limits']['charge_amount']['max'];
        return function ($backend) use ($amount, $defMin, $defMax) {
            // temporary hack for now to correct min value for instalments to 500000
            if ($backend->type == 'installment') {
                $min = 500000;
            } else {
                $min = empty($backend->amount['min']) ? $defMin : $backend->amount['min'];
            }
            $max = empty($backend->amount['max']) ? $defMax : $backend->amount['max'];
            return $amount >= $min && $amount <= $max;
        };
    }
public function makeBackendFilterChargeAmount($amount)
    {
        $defMin = $this['limits']['charge_amount']['min'];
        $defMax = $this['limits']['charge_amount']['max'];
        return function ($backend) use ($amount, $defMin, $defMax) {
            // temporary hack for now to correct min value for instalments to 500000
            if ($backend->type == 'installment') {
                $min = 500000;
            } else {
                $min = empty($backend->amount['min']) ? $defMin : $backend->amount['min'];
            }
            $max = empty($backend->amount['max']) ? $defMax : $backend->amount['max'];
            return $amount >= $min && $amount <= $max;
        };
    }
public function makeBackendFilterChargeAmount ( $ amount ) { $ defMin = $ this [ 'limits' ] [ 'charge_amount' ] [ 'min' ] ; $ defMax = $ this [ 'limits' ] [ 'charge_amount' ] [ 'max' ] ; return function ( $ backend ) use ( $ amount , $ defMin , $ defMax ) { // temporary hack for now to correct min value for instalments to 500000 if ( $ backend -> type == 'installment' ) { $ min = 500000 ; } else { $ min = empty ( $ backend -> amount [ 'min' ] ) ? $ defMin : $ backend -> amount [ 'min' ] ; } $ max = empty ( $ backend -> amount [ 'max' ] ) ? $ defMax : $ backend -> amount [ 'max' ] ; return $ amount >= $ min && $ amount <= $ max ; } ; }
Makes a filter function to check if backends can handle given amount.

@param  int $amount

@return function
Makes a filter function to check if backends can handle given amount .