From 795b5e6a167c54e6778a4535365d6fc392e97e45 Mon Sep 17 00:00:00 2001 From: Miguel-MultiSafepay <104830395+Miguel-MultiSafepay@users.noreply.github.com> Date: Thu, 22 Dec 2022 13:20:29 +0100 Subject: [PATCH] PLGCSCS-140: Fix the options within the select field for Ideal issuers (#48) --- .../smarty/plugins/block.msp_issuers.php | 26 +++++++++--------- .../templater/plugins/block.msp_issuers.php | 24 +++++++++-------- .../smarty/libs/plugins/block.msp_issuers.php | 27 ++++++++++--------- 3 files changed, 40 insertions(+), 37 deletions(-) diff --git a/src/app/lib/other/smarty/plugins/block.msp_issuers.php b/src/app/lib/other/smarty/plugins/block.msp_issuers.php index 55cdd74..652f49f 100644 --- a/src/app/lib/other/smarty/plugins/block.msp_issuers.php +++ b/src/app/lib/other/smarty/plugins/block.msp_issuers.php @@ -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 { @@ -48,23 +46,25 @@ function smarty_block_msp_issuers($params, $content, &$smarty, &$repeat) $iDealIssuers = $msp->getIdealIssuers(); + $idealselect = '
'; + $idealselect .= ''; + if (!empty($iDealIssuers['issuers']['issuer'])) { + $idealselect .= ''; - if ($processor_data['processor_params']['mode'] == 'T') { - foreach ($iDealIssuers['issuers'] as $issuer) { - $idealselect .= ''; - } - } else { foreach ($iDealIssuers['issuers']['issuer'] as $issuer) { - $idealselect .= ''; + if (!empty($issuer['code']['VALUE']) && !empty($issuer['description']['VALUE'])) { + $idealselect .= ''; + } } } - $idealselect .= ''; - - + else { + // There are no banks available + $idealselect .= ''; + } + $idealselect .= '
'; return $idealselect; } -?> \ No newline at end of file +?> diff --git a/src/app/lib/other/templater/plugins/block.msp_issuers.php b/src/app/lib/other/templater/plugins/block.msp_issuers.php index 30674ba..652f49f 100644 --- a/src/app/lib/other/templater/plugins/block.msp_issuers.php +++ b/src/app/lib/other/templater/plugins/block.msp_issuers.php @@ -46,23 +46,25 @@ function smarty_block_msp_issuers($params, $content, &$smarty, &$repeat) $iDealIssuers = $msp->getIdealIssuers(); + $idealselect = '
'; + $idealselect .= ''; + if (!empty($iDealIssuers['issuers']['issuer'])) { + $idealselect .= ''; - if ($processor_data['processor_params']['mode'] == 'T') { - foreach ($iDealIssuers['issuers'] as $issuer) { - $idealselect .= ''; - } - } else { foreach ($iDealIssuers['issuers']['issuer'] as $issuer) { - $idealselect .= ''; + if (!empty($issuer['code']['VALUE']) && !empty($issuer['description']['VALUE'])) { + $idealselect .= ''; + } } } - $idealselect .= ''; - - + else { + // There are no banks available + $idealselect .= ''; + } + $idealselect .= '
'; return $idealselect; } -?> \ No newline at end of file +?> diff --git a/src/app/lib/vendor/smarty/smarty/libs/plugins/block.msp_issuers.php b/src/app/lib/vendor/smarty/smarty/libs/plugins/block.msp_issuers.php index 55cdd74..7a189d7 100644 --- a/src/app/lib/vendor/smarty/smarty/libs/plugins/block.msp_issuers.php +++ b/src/app/lib/vendor/smarty/smarty/libs/plugins/block.msp_issuers.php @@ -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 { @@ -48,23 +46,26 @@ function smarty_block_msp_issuers($params, $content, &$smarty, &$repeat) $iDealIssuers = $msp->getIdealIssuers(); + $idealselect = '
'; + $idealselect .= ''; + if (!empty($iDealIssuers['issuers']['issuer'])) { + $idealselect .= ''; - if ($processor_data['processor_params']['mode'] == 'T') { - foreach ($iDealIssuers['issuers'] as $issuer) { - $idealselect .= ''; - } - } else { foreach ($iDealIssuers['issuers']['issuer'] as $issuer) { - $idealselect .= ''; + if (!empty($issuer['code']['VALUE']) && !empty($issuer['description']['VALUE'])) { + $idealselect .= ''; + } } } - $idealselect .= ''; - - + else { + // There are no banks available + $idealselect .= ''; + } + $idealselect .= '
'; return $idealselect; } -?> \ No newline at end of file +?> +