Converts account and bank numbers to IBAN

@return string
484781
public function getIBAN()
    {
        if (!is_null($this->iban)) {
            return $this->iban;
        }
        $this->country = strtoupper($this->country);

        $part1 = ord($this->country[0]) - ord('A') + 10;
        $part2 = ord($this->country[1]) - ord('A') + 10;

        $accountPrefix = 0;
        $accountNumber = $this->account;
        if (strpos($accountNumber, '-') !== false) {
            $accountParts = explode('-', $accountNumber);
            $accountPrefix = $accountParts[0];
            $accountNumber = $accountParts[1];
        }

        $numeric = sprintf('%04d%06d%010d%d%d00', $this->bank, $accountPrefix, $accountNumber, $part1, $part2);

        $mod = '';
        foreach (str_split($numeric) as $n) {
            $mod = ($mod . $n) % 97;
        }
        $mod = intval($mod);

        $this->iban = sprintf('%.2s%02d%04d%06d%010d', $this->country, 98 - $mod, $this->bank, $accountPrefix, $accountNumber);

        return $this->iban;
    }
600975
public function getCountryCode()
    {
        $countryCode = '';
        $iban = $this->getIban();
        if (!empty($iban)) {
            $countryCode = substr($iban, 0, 2);
        }
        return $countryCode;
    }
392652
private function doGetOrdinalsBin()
    {
        $ordinals = [];
        $bitset   = $this->bitset;
        $byteLen  = \strlen($bitset);
        for ($bytePos = 0; $bytePos < $byteLen; ++$bytePos) {
            if ($bitset[$bytePos] === "\0") {
                // fast skip null byte
                continue;
            }

            $ord = \ord($bitset[$bytePos]);
            for ($bitPos = 0; $bitPos < 8; ++$bitPos) {
                if ($ord & (1 << $bitPos)) {
                    $ordinals[] = $bytePos * 8 + $bitPos;
                }
            }
        }
        return $ordinals;
    }
775393
public function getTransfered()
    {
        $base = log($this->transfered, 1024);
        $suffixes = array(
            '',
            'K',
            'M',
            'G',
            'T',
        );
        return round(pow(1024, $base - floor($base)), 2) . ' ' . $suffixes[floor($base)];
    }
1053981
public function getAccounts()
    {
        $dialog = $this->getDialog();
        $result = $dialog->syncDialog();
        $this->bankName = $dialog->getBankName();
        $accounts = new GetAccounts($result);

        return $accounts->getAccountsArray();
    }
1213166
public function getFormattedTotalBrutSum()
    {
        return \OxidEsales\Eshop\Core\Registry::getLang()->formatCurrency($this->oxorder__oxtotalbrutsum->value, $this->getOrderCurrency());
    }
956013
public function getSEPAAccountsArray()
    {
        $accounts = $this->findSegment(static::SEG_ACCOUNT_INFORMATION);

        if (is_string($accounts)) {
            $accounts = $this->splitSegment($accounts);
            array_shift($accounts);
            foreach ($accounts as $account) {
                $array = $this->splitDeg($account);
                $this->accounts[] = $this->createModelFromArray($array);
            }
        }

        return $this->accounts;
    }
1303394
public function getBasicAuth()
    {
        if (empty($this->basicAuth))
            return "";

        if (empty($this->basicAuth["username"]))
            // Username cannot be empty in Basic Authentication
            return "";

        $username = $this->basicAuth["username"];
        $password = isset($this->basicAuth["password"]) ? $this->basicAuth["password"] : "";
        return sprintf("%s:%s@", $username, $password);
    }
59405
public function getBankAccount()
    {
        if ($this->type == self::PAYMENT_INSTRUMENT_TYPE_BANK_ACCOUNT && !empty($this->data)) {
            return $this->data;
        }

        return null;
    }
374943
public static function GetBaseCurrency()
    {
        static $oInstance = null;
        if (null === $oInstance) {
            $oInstance = TdbPkgShopCurrency::GetNewInstance();
            if (false === $oInstance->LoadFromField('is_base_currency', '1')) {
                $oInstance = false;
            }
        }

        return $oInstance;
    }
144414
public static function iban($value)
    {
        $values = '';
        $mod = 0;
        $remove = [' ', '-', '_', '.', ',','/', '|'];
        $cleared = str_replace($remove, '', $value);
        $temp = strtoupper($cleared);

        $firstChar = $temp{0} <= '9';
        $secondChar = $temp{1} <= '9';

        if ($firstChar && $secondChar) {
            $temp = 'PL' . $temp;
        }

        $temp = substr($temp, 4) . substr($temp, 0, 4);

        foreach (str_split($temp) as $val) {
            $values .= self::IBAN_CHARS[$val];
        }

        $sum = strlen($values);
        for ($i = 0; $i < $sum; $i += 6) {
            $separated = $mod . substr($values, $i, 6);
            $mod = (int)($separated) % 97;
        }

        return $mod === 1;
    }
460086
protected function getIbanForBankAccount($bankAccount): string
    {
        /** @var Pointer $alias */
        foreach ($bankAccount->getAlias() as $alias) {
            if (self::IBAN === $alias->getType()) {
                return $alias->getValue();
            }
        }

        return self::UNKNOWN;
    }
996972
public function toString()
    {

        $request = array();
        $request['Reference'] = $this->reference;
        $request['PagSeguroPreApprovalCode'] = $this->preApprovalCode;

        return "PagSeguroPaymentCharge: " . var_export($request, true);
    }
757796
public function getSteamID64() {
		if (PHP_INT_SIZE == 4) {
			$ret = new Math_BigInteger();
			$ret = $ret->add((new Math_BigInteger($this->universe))->bitwise_leftShift(56));
			$ret = $ret->add((new Math_BigInteger($this->type))->bitwise_leftShift(52));
			$ret = $ret->add((new Math_BigInteger($this->instance))->bitwise_leftShift(32));
			$ret = $ret->add(new Math_BigInteger($this->accountid));
			return $ret->toString();
		}
		return (string) (($this->universe << 56) | ($this->type << 52) | ($this->instance << 32) | ($this->accountid));
	}
419922
public function toBinary()
    {
        $bytes = '';

        foreach (str_split($this->value, 8) as $piece) {
            $bytes .= chr(bindec($piece));
        }

        return $bytes;
    }
198146
protected function parseTransactionAccount()
    {
        $results = [];
        // SEPA MT940 Structured
        if (preg_match('/^:61:.*\n(.*?)(\n|\:8)/im', $this->getCurrentTransactionData(), $results)
            && !empty($results[1])
        ) {
            return $this->sanitizeAccount($results[1]);
        }

        if (preg_match('/^:61:.{26}(.{16})/m', $this->getCurrentTransactionData(), $results)
            && !empty($results[1])
        ) {
            return $this->sanitizeAccount($results[1]);
        }

        return '';
    }
357100
public function convertToUtf()
    {
        $dbHandler = $this->getDbHandler();

        $rs = $dbHandler->query(
            "SELECT oxvarname, oxvartype, DECODE( oxvarvalue, '{$this->getConfigKey()}') AS oxvarvalue
                       FROM oxconfig
                       WHERE oxvartype IN ('str', 'arr', 'aarr')"
        );

        while ( (false !== $rs) && ($aRow = $rs->fetch())) {
            if ($aRow['oxvartype'] == 'arr' || $aRow['oxvartype'] == 'aarr') {
                $aRow['oxvarvalue'] = unserialize($aRow['oxvarvalue']);
            }
            if (!empty($aRow['oxvarvalue']) && !is_int($aRow['oxvarvalue'])) {
                $this->updateConfigValue($aRow['oxid'], $this->stringToUtf($aRow['oxvarvalue']));
            }
        }

        // Change currencies value to same as after 4.6 setup because previous encoding break it.
        $shopId = 1;

        $query = "REPLACE INTO `oxconfig` (`OXID`, `OXSHOPID`, `OXMODULE`, `OXVARNAME`, `OXVARTYPE`, `OXVARVALUE`) VALUES
            ('3c4f033dfb8fd4fe692715dda19ecd28', $shopId, '', 'aCurrencies', 'arr', 0x4dbace2972e14bf2cbd3a9a45157004422e928891572b281961cdebd1e0bbafe8b2444b15f2c7b1cfcbe6e5982d87434c3b19629dacd7728776b54d7caeace68b4b05c6ddeff2df9ff89b467b14df4dcc966c504477a9eaeadd5bdfa5195a97f46768ba236d658379ae6d371bfd53acd9902de08a1fd1eeab18779b191f3e31c258a87b58b9778f5636de2fab154fc0a51a2ecc3a4867db070f85852217e9d5e9aa60507);";

        $dbHandler->query($query);
    }