Helper/Helper.php
public function isMadaBin($bin) {
        // Set the root path
        $csvPath = $this->directoryReader->getModuleDir('', 'CheckoutCom_Magento2')  . '/' . $this->config->getMadaBinsPath();

        // Get the data
        $csvData = $this->csvParser->getData($csvPath);

        // Remove the first row of csv columns
        unset($csvData[0]);

        // Build the MADA BIN array
        $binArray = [];
        foreach ($csvData as $row) {
            $binArray[] = $row[1];
        }

        return in_array($bin, $binArray);
    }
public function isMadaBin($bin) {
        // Set the root path
        $csvPath = $this->directoryReader->getModuleDir('', 'CheckoutCom_Magento2')  . '/' . $this->config->getMadaBinsPath();

        // Get the data
        $csvData = $this->csvParser->getData($csvPath);

        // Remove the first row of csv columns
        unset($csvData[0]);

        // Build the MADA BIN array
        $binArray = [];
        foreach ($csvData as $row) {
            $binArray[] = $row[1];
        }

        return in_array($bin, $binArray);
    }
public function isMadaBin ( $ bin ) { // Set the root path $ csvPath = $ this -> directoryReader -> getModuleDir ( '' , 'CheckoutCom_Magento2' ) . '/' . $ this -> config -> getMadaBinsPath ( ) ; // Get the data $ csvData = $ this -> csvParser -> getData ( $ csvPath ) ; // Remove the first row of csv columns unset ( $ csvData [ 0 ] ) ; // Build the MADA BIN array $ binArray = [ ] ; foreach ( $ csvData as $ row ) { $ binArray [ ] = $ row [ 1 ] ; } return in_array ( $ bin , $ binArray ) ; }
Checks the MADA BIN

@return bool
Checks the MADA BIN