Skip to content

Commit b271a41

Browse files
3.6.0
Comply with new validation rules from Magento
1 parent dded6b8 commit b271a41

File tree

11 files changed

+132
-60
lines changed

11 files changed

+132
-60
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
66

7-
## [3.5.6] - 2025-11-24
7+
## [3.6.0] - 2025-11-24
88

99
- Fix a typo on a Fintecture URL
10-
- Internal fix
10+
- Internal fixes
1111

1212
## [3.5.5] - 2025-02-24
1313

Gateway/Config/Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
class Config extends BaseConfig
88
{
99
public const CODE = 'fintecture';
10-
public const VERSION = '3.5.6';
10+
public const VERSION = '3.6.0';
1111

1212
public const KEY_SHOP_NAME = 'general/store_information/name';
1313
public const KEY_ACTIVE = 'active';

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Fintecture module for Magento 2.4 & 2.3
22

3-
[![Latest Stable Version](http://poser.pugx.org/fintecture/payment/v)](https://packagist.org/packages/fintecture/payment) [![Total Downloads](http://poser.pugx.org/fintecture/payment/downloads)](https://packagist.org/packages/fintecture/payment) [![Monthly Downloads](http://poser.pugx.org/fintecture/payment/d/monthly)](https://packagist.org/fintecture/payment/payment) [![License](http://poser.pugx.org/fintecture/payment/license)](https://packagist.org/packages/fintecture/payment) [![PHP Version Require](http://poser.pugx.org/fintecture/payment/require/php)](https://packagist.org/packages/fintecture/payment)
3+
[![Latest Stable Version](http://poser.pugx.org/fintecture/payment/v)](https://packagist.org/packages/fintecture/payment) [![Total Downloads](http://poser.pugx.org/fintecture/payment/downloads)](https://packagist.org/packages/fintecture/payment) [![Monthly Downloads](http://poser.pugx.org/fintecture/payment/d/monthly)](https://packagist.org/packages/fintecture/payment) [![License](http://poser.pugx.org/fintecture/payment/license)](https://packagist.org/packages/fintecture/payment) [![PHP Version Require](http://poser.pugx.org/fintecture/payment/require/php)](https://packagist.org/packages/fintecture/payment)
44

55
Fintecture is a Fintech that has a payment solution via bank transfer available at https://www.fintecture.com.
66

Setup/Patch/Data/RemoveFintectureBankTypeConfig.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,6 @@ public function getAliases()
4343

4444
public static function getVersion(): string
4545
{
46-
return '3.5.6';
46+
return '3.6.0';
4747
}
4848
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"email": "contact@fintecture.com"
1111
},
1212
"type": "magento2-module",
13-
"version": "3.5.6",
13+
"version": "3.6.0",
1414
"license": [
1515
"GPL-3.0"
1616
],

etc/module.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
4-
<module name="Fintecture_Payment" setup_version="3.5.6">
4+
<module name="Fintecture_Payment" setup_version="3.6.0">
55
<sequence>
66
<module name="Magento_Sales"/>
77
<module name="Magento_Payment"/>

view/adminhtml/templates/system/config/button.phtml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ declare(strict_types=1);
55
use Fintecture\Payment\Block\System\Config\Button;
66

77
/** @var Button $block */
8-
echo $block->getButtonHtml();
9-
?>
8+
?><?= /* @noEscape */ $block->getButtonHtml() ?>
109
<div id="connection-test-result" class="message">
1110
<span class="message-text">
1211
<strong></strong>
1312
</span>
1413
</div>
1514
<script>
16-
const connectionTestUrl = '<?php echo $block->getCustomUrl(); ?>';
15+
const connectionTestUrl = '<?= $block->escapeJs($block->getCustomUrl()) ?>';
1716
</script>

view/frontend/templates/html/checkout/order/error.phtml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,41 @@ $status = $block->getPaymentStatus();
66
<?php if (!empty($status)): ?>
77
<?php if ($status === 'sca_required'): ?>
88
<div class="fintecture-alert fintecture-alert-warning">
9-
<img src="<?php echo $block->getViewFileUrl('Fintecture_Payment::images/warning.svg'); ?>">
10-
<p><?php echo __('The payment has been cancelled and the transaction could not be completed.'); ?></p>
9+
<img src="<?= $block->escapeUrl(
10+
$block->getViewFileUrl('Fintecture_Payment::images/warning.svg')
11+
) ?>">
12+
<p>
13+
<?= $block->escapeHtml(__(
14+
'The payment has been cancelled and the transaction could not be completed.'
15+
)) ?>
16+
</p>
1117
</div>
1218
<?php elseif ($status === 'payment_unsuccessful'): ?>
1319
<div class="fintecture-alert fintecture-alert-danger">
14-
<img src="<?php echo $block->getViewFileUrl('Fintecture_Payment::images/error.svg'); ?>">
15-
<p><?php echo __('The payment has failed. Please select another bank or another payment method.'); ?></p>
20+
<img src="<?= $block->escapeUrl(
21+
$block->getViewFileUrl('Fintecture_Payment::images/error.svg')
22+
) ?>">
23+
<p>
24+
<?= $block->escapeHtml(__(
25+
'The payment has failed. Please select another bank or another payment method.'
26+
)) ?>
27+
</p>
1628
</div>
1729
<?php elseif ($status === 'payment_error' || $status === 'cms_internal_error'): ?>
1830
<div class="fintecture-alert fintecture-alert-danger">
19-
<img src="<?php echo $block->getViewFileUrl('Fintecture_Payment::images/error.svg'); ?>">
20-
<p><?php echo __('A technical error has occurred. Please contact <a href="%1" target="_blank">the merchant</a> or Fintecture by email at <a href="mailto:%2">%2</a> or via <a href="%3" target="_blank">chat</a>.', $block->getUrl('contact'), 'support@fintecture.com', 'https://help.fintecture.com'); ?></p>
31+
<img src="<?= $block->escapeUrl(
32+
$block->getViewFileUrl('Fintecture_Payment::images/error.svg')
33+
) ?>">
34+
<p>
35+
<?= /* @noEscape */ __(
36+
'A technical error has occurred. Please contact '
37+
. '<a href="%1" target="_blank">the merchant</a> or Fintecture '
38+
. 'by email at <a href="mailto:%2">%2</a> or via <a href="%3" target="_blank">chat</a>.',
39+
$block->escapeUrl($block->getUrl('contact')),
40+
$block->escapeHtml('support@fintecture.com'),
41+
$block->escapeUrl('https://help.fintecture.com')
42+
) ?>
43+
</p>
2144
</div>
2245
<?php endif ?>
2346
<?php endif ?>

view/frontend/templates/html/checkout/order/success.phtml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,25 @@
33
?>
44
<?php if ($block->getPaymentStatus() === 'payment_created'): ?>
55
<div class="fintecture-alert fintecture-alert-success">
6-
<img src="<?php echo $block->getViewFileUrl('Fintecture_Payment::images/success.svg'); ?>">
7-
<p><?php echo __('Your payment with Fintecture has been successfully processed!'); ?></p>
6+
<img src="<?= $block->escapeUrl(
7+
$block->getViewFileUrl('Fintecture_Payment::images/success.svg')
8+
) ?>">
9+
<p>
10+
<?= $block->escapeHtml(__(
11+
'Your payment with Fintecture has been successfully processed!'
12+
)) ?>
13+
</p>
814
</div>
915
<?php elseif ($block->getPaymentStatus() === 'payment_pending'): ?>
1016
<div class="fintecture-alert fintecture-alert-info">
11-
<img src="<?php echo $block->getViewFileUrl('Fintecture_Payment::images/info.svg'); ?>">
12-
<p><?php echo __('Your payment with Fintecture is currently being processed by your bank. You can track the status of your payment using the link provided in the confirmation email.'); ?></p>
17+
<img src="<?= $block->escapeUrl(
18+
$block->getViewFileUrl('Fintecture_Payment::images/info.svg')
19+
) ?>">
20+
<p>
21+
<?= $block->escapeHtml(__(
22+
'Your payment with Fintecture is currently being processed by your bank. '
23+
. 'You can track the status of your payment using the link provided in the confirmation email.'
24+
)) ?>
25+
</p>
1326
</div>
1427
<?php endif; ?>

view/frontend/templates/html/qrcode.phtml

Lines changed: 45 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,40 +4,64 @@
44
<div style="text-align: center;">
55
<?php
66
if ($block->getData('confirm')) {
7-
?>
8-
<h2><?php echo __('Order validated'); ?></h2>
7+
?>
8+
<h2><?= $block->escapeHtml(__('Order validated')) ?></h2>
99

10-
<p><?php echo __('If the payment has been made, then the order will be validated in a few moments.'); ?></p>
10+
<p>
11+
<?= $block->escapeHtml(__(
12+
'If the payment has been made, then the order will be validated in a few moments.'
13+
)) ?>
14+
</p>
1115

12-
<p><b><?php echo $block->getData('amount'); ?> <?php echo $block->getData('currency'); ?></b></p>
13-
<p><?php echo $block->getData('reference'); ?></p>
14-
<p><?php echo $block->getData('sessionId'); ?></p>
16+
<p>
17+
<b>
18+
<?= $block->escapeHtml($block->getData('amount')) ?>
19+
<?= $block->escapeHtml($block->getData('currency')) ?>
20+
</b>
21+
</p>
22+
<p><?= $block->escapeHtml($block->getData('reference')) ?></p>
23+
<p><?= $block->escapeHtml($block->getData('sessionId')) ?></p>
1524

16-
<a href="<?php echo $block->getData('baseUrl'); ?>" class="action primary" style="margin-top: 20px;">
17-
<?php echo __('Return to the homepage'); ?>
25+
<a href="<?= $block->escapeUrl($block->getData('baseUrl')) ?>"
26+
class="action primary"
27+
style="margin-top: 20px;">
28+
<?= $block->escapeHtml(__('Return to the homepage')) ?>
1829
</a>
19-
<?php
30+
<?php
2031
} else {
21-
?>
22-
<h2><?php echo __('Scan this QR Code to pay with Fintecture'); ?></h2>
32+
?>
33+
<h2><?= $block->escapeHtml(__('Scan this QR Code to pay with Fintecture')) ?></h2>
2334

24-
<img src="<?php echo $block->getData('qrCode'); ?>">
35+
<img src="<?= $block->escapeUrl($block->getData('qrCode')) ?>">
2536

26-
<p><b><?php echo $block->getData('amount'); ?> <?php echo $block->getData('currency'); ?></b></p>
27-
<p><?php echo $block->getData('reference'); ?></p>
28-
<p><?php echo $block->getData('sessionId'); ?></p>
37+
<p>
38+
<b>
39+
<?= $block->escapeHtml($block->getData('amount')) ?>
40+
<?= $block->escapeHtml($block->getData('currency')) ?>
41+
</b>
42+
</p>
43+
<p><?= $block->escapeHtml($block->getData('reference')) ?></p>
44+
<p><?= $block->escapeHtml($block->getData('sessionId')) ?></p>
2945

30-
<a href="<?php echo $block->getData('confirmUrl'); ?>" title="<?php echo __('Continue'); ?>" class="action primary" style="margin-top: 20px;">
31-
<?php echo __('Continue'); ?>
46+
<a href="<?= $block->escapeUrl($block->getData('confirmUrl')) ?>"
47+
title="<?= $block->escapeHtmlAttr(__('Continue')) ?>"
48+
class="action primary"
49+
style="margin-top: 20px;">
50+
<?= $block->escapeHtml(__('Continue')) ?>
3251
</a>
33-
<?php
52+
<?php
3453
}
3554
?>
3655

37-
<div style="margin-top: 20px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;">
56+
<div style="margin-top: 20px; display: flex; flex-direction: column; align-items: center;
57+
justify-content: center; gap: 8px;">
3858
<span style="text-transform: uppercase; color: #0B1643; font-weight: bold; font-size: 0.8em;">
39-
<?php echo __('Secured connection to your bank by'); ?>
59+
<?= $block->escapeHtml(__('Secured connection to your bank by')) ?>
4060
</span>
41-
<img src="<?php echo $block->getViewFileUrl('Fintecture_Payment::images/fintecture.svg'); ?>" alt="Fintecture" style="height: 25px;">
61+
<img src="<?= $block->escapeUrl(
62+
$block->getViewFileUrl('Fintecture_Payment::images/fintecture.svg')
63+
) ?>"
64+
alt="Fintecture"
65+
style="height: 25px;">
4266
</div>
4367
</div>

0 commit comments

Comments
 (0)