Skip to content

Commit

Permalink
updated renderlist function
Browse files Browse the repository at this point in the history
  • Loading branch information
Mezai committed Nov 20, 2015
1 parent 5752cb5 commit f2d93b4
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions klarnapayments.php
Original file line number Diff line number Diff line change
Expand Up @@ -1496,27 +1496,19 @@ public function renderForm()
public function renderList()
{
$active_countries = KlarnaConfigHandler::returnActiveCountries();
foreach ($active_countries as $countries)
{
$pclasses_uri = dirname(__FILE__).'/pclasses/pclasses'.Tools::strtolower($countries).'.json';
if (!file_exists($pclasses_uri))
return;
}


foreach ($active_countries as $countries)
{
$klarna_merchant_id = KlarnaConfigHandler::getMerchantID($countries);

$pclasses_uri = dirname(__FILE__).'/pclasses/pclasses'.Tools::strtolower($countries).'.json';
if (file_exists($pclasses_uri))
{

$klarna_merchant_id = KlarnaConfigHandler::getMerchantID($countries);
$fetch_json = Tools::file_get_contents($pclasses_uri);
$json_assoc = Tools::jsonDecode($fetch_json, true);
$helper_array = $json_assoc[$klarna_merchant_id];
}
}
$helper_array = $json_assoc[$klarna_merchant_id];


$this->fields_list = array(
'eid' => array(
Expand Down

0 comments on commit f2d93b4

Please sign in to comment.