Skip to content

Commit

Permalink
PLGCSCS-138: Fix the options within the select field for Ideal issuer…
Browse files Browse the repository at this point in the history
…s (#48)
  • Loading branch information
Miguel-MultiSafepay authored Dec 22, 2022
1 parent fc38080 commit 6e3a233
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 37 deletions.
26 changes: 13 additions & 13 deletions src/app/lib/other/smarty/plugins/block.msp_issuers.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ function smarty_block_msp_issuers($params, $content, &$smarty, &$repeat)

require_once (DIR_ROOT . '/app/payments/MultiSafepay.combined.php');



if ($processor_data['processor_params']['mode'] == 'T') {
$test = true;
} else {
Expand All @@ -48,23 +46,25 @@ function smarty_block_msp_issuers($params, $content, &$smarty, &$repeat)

$iDealIssuers = $msp->getIdealIssuers();

$idealselect = '<div class="litecheckout__field cm-field-container litecheckout__field--small litecheckout__field--state">';
$idealselect .= '<select name="payment_info[issuer]" class="issuerselect litecheckout__input litecheckout__input--selectable litecheckout__input--selectable--select" id="issuerselect">';

$idealselect = '<select name="payment_info[issuer]" class="issuerselect" id="issuerselect"><option value="">Kies uw bank</option>';
if (!empty($iDealIssuers['issuers']['issuer'])) {
$idealselect .= '<option value="">Kies uw bank</option>';

if ($processor_data['processor_params']['mode'] == 'T') {
foreach ($iDealIssuers['issuers'] as $issuer) {
$idealselect .= '<option value="' . $issuer['code']['VALUE'] . '">' . $issuer['description']['VALUE'] . '</option>';
}
} else {
foreach ($iDealIssuers['issuers']['issuer'] as $issuer) {
$idealselect .= '<option value="' . $issuer['code']['VALUE'] . '">' . $issuer['description']['VALUE'] . '</option>';
if (!empty($issuer['code']['VALUE']) && !empty($issuer['description']['VALUE'])) {
$idealselect .= '<option value="' . $issuer['code']['VALUE'] . '">' . $issuer['description']['VALUE'] . '</option>';
}
}
}
$idealselect .= '</select>';


else {
// There are no banks available
$idealselect .= '<option value="">Er zijn geen banken beschikbaar</option>';
}
$idealselect .= '</select></div>';

return $idealselect;
}

?>
?>
24 changes: 13 additions & 11 deletions src/app/lib/other/templater/plugins/block.msp_issuers.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,25 @@ function smarty_block_msp_issuers($params, $content, &$smarty, &$repeat)

$iDealIssuers = $msp->getIdealIssuers();

$idealselect = '<div class="litecheckout__field cm-field-container litecheckout__field--small litecheckout__field--state">';
$idealselect .= '<select name="payment_info[issuer]" class="issuerselect litecheckout__input litecheckout__input--selectable litecheckout__input--selectable--select" id="issuerselect">';

$idealselect = '<select name="payment_info[issuer]" class="issuerselect" id="issuerselect"><option value="">Kies uw bank</option>';
if (!empty($iDealIssuers['issuers']['issuer'])) {
$idealselect .= '<option value="">Kies uw bank</option>';

if ($processor_data['processor_params']['mode'] == 'T') {
foreach ($iDealIssuers['issuers'] as $issuer) {
$idealselect .= '<option value="' . $issuer['code']['VALUE'] . '">' . $issuer['description']['VALUE'] . '</option>';
}
} else {
foreach ($iDealIssuers['issuers']['issuer'] as $issuer) {
$idealselect .= '<option value="' . $issuer['code']['VALUE'] . '">' . $issuer['description']['VALUE'] . '</option>';
if (!empty($issuer['code']['VALUE']) && !empty($issuer['description']['VALUE'])) {
$idealselect .= '<option value="' . $issuer['code']['VALUE'] . '">' . $issuer['description']['VALUE'] . '</option>';
}
}
}
$idealselect .= '</select>';


else {
// There are no banks available
$idealselect .= '<option value="">Er zijn geen banken beschikbaar</option>';
}
$idealselect .= '</select></div>';

return $idealselect;
}

?>
?>
27 changes: 14 additions & 13 deletions src/app/lib/vendor/smarty/smarty/libs/plugins/block.msp_issuers.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ function smarty_block_msp_issuers($params, $content, &$smarty, &$repeat)

require_once (DIR_ROOT . '/app/payments/MultiSafepay.combined.php');



if ($processor_data['processor_params']['mode'] == 'T') {
$test = true;
} else {
Expand All @@ -48,23 +46,26 @@ function smarty_block_msp_issuers($params, $content, &$smarty, &$repeat)

$iDealIssuers = $msp->getIdealIssuers();

$idealselect = '<div class="litecheckout__field cm-field-container litecheckout__field--small litecheckout__field--state">';
$idealselect .= '<select name="payment_info[issuer]" class="issuerselect litecheckout__input litecheckout__input--selectable litecheckout__input--selectable--select" id="issuerselect">';

$idealselect = '<select name="payment_info[issuer]" class="issuerselect" id="issuerselect"><option value="">Kies uw bank</option>';
if (!empty($iDealIssuers['issuers']['issuer'])) {
$idealselect .= '<option value="">Kies uw bank</option>';

if ($processor_data['processor_params']['mode'] == 'T') {
foreach ($iDealIssuers['issuers'] as $issuer) {
$idealselect .= '<option value="' . $issuer['code']['VALUE'] . '">' . $issuer['description']['VALUE'] . '</option>';
}
} else {
foreach ($iDealIssuers['issuers']['issuer'] as $issuer) {
$idealselect .= '<option value="' . $issuer['code']['VALUE'] . '">' . $issuer['description']['VALUE'] . '</option>';
if (!empty($issuer['code']['VALUE']) && !empty($issuer['description']['VALUE'])) {
$idealselect .= '<option value="' . $issuer['code']['VALUE'] . '">' . $issuer['description']['VALUE'] . '</option>';
}
}
}
$idealselect .= '</select>';


else {
// There are no banks available
$idealselect .= '<option value="">Er zijn geen banken beschikbaar</option>';
}
$idealselect .= '</select></div>';

return $idealselect;
}

?>
?>

0 comments on commit 6e3a233

Please sign in to comment.