From 4a0e6f38afbba9a2a714671564120f21a691c3c4 Mon Sep 17 00:00:00 2001 From: Lucian Turiac Date: Mon, 15 Jan 2024 16:40:01 +0200 Subject: [PATCH] Fixing issues after merge with "develop" --- .../Request/Capayable/In3V3DataBuilder.php | 2 +- Model/ConfigProvider/Method/Ideal.php | 12 +++++++++ Service/Ideal/IssuersService.php | 1 - .../system/payment_methods/creditcard.xml | 27 ++++++++++--------- .../system/payment_methods/creditclick.xml | 10 ------- .../payment/buckaroo_magento2_creditcard.html | 9 +++++-- 6 files changed, 34 insertions(+), 27 deletions(-) diff --git a/Gateway/Request/Capayable/In3V3DataBuilder.php b/Gateway/Request/Capayable/In3V3DataBuilder.php index 00696fb11..7244e56b3 100644 --- a/Gateway/Request/Capayable/In3V3DataBuilder.php +++ b/Gateway/Request/Capayable/In3V3DataBuilder.php @@ -53,7 +53,7 @@ public function build(array $buildSubject): array $data = []; - if ($this->capayableIn3Config->isV3()) { + if (!$this->capayableIn3Config->isV2()) { $payment->setAdditionalInformation("buckaroo_in3_v3", true); $data['payment_method'] = 'in3'; } diff --git a/Model/ConfigProvider/Method/Ideal.php b/Model/ConfigProvider/Method/Ideal.php index 1d046548e..87d84d9d3 100644 --- a/Model/ConfigProvider/Method/Ideal.php +++ b/Model/ConfigProvider/Method/Ideal.php @@ -175,4 +175,16 @@ public function getImageUrl($imgName, string $extension = 'png') { return parent::getImageUrl("ideal/{$imgName}", "svg"); } + + public function getAllIssuers(): array + { + $issuers = $this->getIssuers(); + $issuersPrepared = []; + foreach ($issuers as $issuer) { + $issuer['img'] = $issuer['logo']; + $issuersPrepared[$issuer['code']] = $issuer; + } + + return $issuersPrepared; + } } diff --git a/Service/Ideal/IssuersService.php b/Service/Ideal/IssuersService.php index 86890f8a7..6991b7c0a 100644 --- a/Service/Ideal/IssuersService.php +++ b/Service/Ideal/IssuersService.php @@ -87,7 +87,6 @@ public function __construct( public function get(): array { $issuers = $this->getCachedIssuers(); - $issuers = null; if ($issuers === null) { return $this->updateCacheIssuers(); } diff --git a/etc/adminhtml/system/payment_methods/creditcard.xml b/etc/adminhtml/system/payment_methods/creditcard.xml index a3d941ee2..2cdc9f22e 100644 --- a/etc/adminhtml/system/payment_methods/creditcard.xml +++ b/etc/adminhtml/system/payment_methods/creditcard.xml @@ -74,19 +74,6 @@ - - - - payment/buckaroo_magento2_creditcard/allowed_issuers - Buckaroo\Magento2\Model\Config\Source\Creditcard - - - - - Buckaroo\Magento2\Block\Adminhtml\Form\Field\SortIssuers - - payment/buckaroo_magento2_creditcard/sorted_issuers - @@ -164,6 +151,20 @@ payment/buckaroo_magento2_creditcards/selection_type + + + + payment/buckaroo_magento2_creditcard/allowed_issuers + Buckaroo\Magento2\Model\Config\Source\Creditcard + + + + + Buckaroo\Magento2\Block\Adminhtml\Form\Field\SortIssuers + + payment/buckaroo_magento2_creditcard/sorted_issuers + + diff --git a/etc/adminhtml/system/payment_methods/creditclick.xml b/etc/adminhtml/system/payment_methods/creditclick.xml index ac3b9247c..6ed078a40 100644 --- a/etc/adminhtml/system/payment_methods/creditclick.xml +++ b/etc/adminhtml/system/payment_methods/creditclick.xml @@ -76,16 +76,6 @@ For precise cost details, please reach out to - - - Buckaroo\Magento2\Block\Adminhtml\Form\Field\SortIssuers - - - 1 - - payment/buckaroo_magento2_creditclick/sorted_issuers - - diff --git a/view/frontend/web/template/payment/buckaroo_magento2_creditcard.html b/view/frontend/web/template/payment/buckaroo_magento2_creditcard.html index 54b3f2dca..b8e536342 100644 --- a/view/frontend/web/template/payment/buckaroo_magento2_creditcard.html +++ b/view/frontend/web/template/payment/buckaroo_magento2_creditcard.html @@ -135,8 +135,13 @@ -
- +
+ +
+ +
+ +