From 6e3a23382c3b6fe639a4014aa754058392621dc2 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-138: 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 .= '
';
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 .= '';
- $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 .= '';
- $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
+?>
+