Skip to content

Commit

Permalink
Fix 404
Browse files Browse the repository at this point in the history
  • Loading branch information
ariselseng committed Aug 19, 2020
1 parent 3dd7e4b commit 1105cb2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/NorwegianBanks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@

class NorwegianBanks
{
private const XlsFileUrl = 'https://www.finansnorge.no/contentassets/cc4fabf26cea4569aa447aa9ae671efa/norwegian-iban-bic-table.xls';
private const xlsFileTtl = 1440;
private const XlsFileUrl = 'https://www.bits.no/document/iban/';
private const xlsFileTtl = 86400;

private $xlsFilePath;
private $banks;
private $prefixToBankCode;

public function __construct()
{
$this->xlsFilePath = sys_get_temp_dir() . '/.cache-norwegianbanks-norwegian-iban-bic-table.xls';
$this->xlsFilePath = sys_get_temp_dir() . '/.cache-norwegianbanks-norwegian-iban-bic-table.xlsx';
$this->processData();
}

Expand Down Expand Up @@ -64,7 +64,7 @@ private function processData()
if (!$hasCacheDir || !isset($banks)) {
$banks = [];
$prefixToBankCode = [];
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader("Xls");
$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReader("Xlsx");
$reader->setReadDataOnly(true);

$spreadsheet = $reader->load($this->xlsFilePath);
Expand Down

0 comments on commit 1105cb2

Please # to comment.