From dded6b8014841261c2c0308732dbca127ba52ead Mon Sep 17 00:00:00 2001 From: "quentin.patras" Date: Mon, 24 Nov 2025 11:44:50 +0100 Subject: [PATCH 1/2] 3.5.6 --- .gitignore | 4 +- CHANGELOG.md | 5 + Controller/WebhookAbstract.php | 2 +- Gateway/Config/BnplConfig.php | 6 +- Gateway/Config/Config.php | 52 ++++---- Gateway/Http/Sdk.php | 46 +++++--- Model/AlternativeMethod.php | 4 +- Model/Cache/Type.php | 4 +- README.md | 6 +- .../Data/RemoveFintectureBankTypeConfig.php | 2 +- composer.json | 111 +++++++++--------- etc/adminhtml/system.xml | 79 ------------- etc/config.xml | 20 ---- etc/module.xml | 2 +- etc/payment.xml | 8 -- i18n/en_US.csv | 6 +- i18n/es_ES.csv | 8 +- i18n/fr_FR.csv | 6 +- .../templates/html/checkout/order/error.phtml | 2 +- .../web/template/payment/fintecture.html | 14 +-- 20 files changed, 151 insertions(+), 236 deletions(-) diff --git a/.gitignore b/.gitignore index 4f958b0..41d3a5b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,6 @@ composer.lock .php-cs-fixer.cache .phpunit.cache/* .phpunit.result.cache -.phpunit.xml.bak \ No newline at end of file +.phpunit.xml.bak +fintecture/* +virementmaitrise/* \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 047dbf2..2e77cb6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). +## [3.5.6] - 2025-11-24 + +- Fix a typo on a Fintecture URL +- Internal fix + ## [3.5.5] - 2025-02-24 - Add `RequestToPay` webhook type in whitelist diff --git a/Controller/WebhookAbstract.php b/Controller/WebhookAbstract.php index 2e011ae..9c544db 100644 --- a/Controller/WebhookAbstract.php +++ b/Controller/WebhookAbstract.php @@ -52,7 +52,7 @@ abstract class WebhookAbstract implements CsrfAwareActionInterface 'Refund', 'BuyNowPayLater', 'ManualTransfer', - 'RequestToPay' + 'RequestToPay', ]; public function __construct( diff --git a/Gateway/Config/BnplConfig.php b/Gateway/Config/BnplConfig.php index e7d1f43..ed34ac7 100644 --- a/Gateway/Config/BnplConfig.php +++ b/Gateway/Config/BnplConfig.php @@ -6,10 +6,10 @@ class BnplConfig extends BaseConfig { - const CODE = 'fintecture_bnpl'; + public const CODE = 'fintecture_bnpl'; - const KEY_ACTIVE = 'active'; - const KEY_RECOMMEND_BNPL_BADGE = 'recommend_bnpl_badge'; + public const KEY_ACTIVE = 'active'; + public const KEY_RECOMMEND_BNPL_BADGE = 'recommend_bnpl_badge'; public function isActive(): bool { diff --git a/Gateway/Config/Config.php b/Gateway/Config/Config.php index ab73b12..87bb108 100644 --- a/Gateway/Config/Config.php +++ b/Gateway/Config/Config.php @@ -6,32 +6,32 @@ class Config extends BaseConfig { - const CODE = 'fintecture'; - const VERSION = '3.5.5'; - - const KEY_SHOP_NAME = 'general/store_information/name'; - const KEY_ACTIVE = 'active'; - const KEY_ALLOW_SPECIFIC = 'allowspecific'; - const KEY_SPECIFIC_COUNTRY = 'specificcountry'; - const KEY_ENVIRONMENT = 'environment'; - const KEY_APP_ID_SANDBOX = 'fintecture_app_id_sandbox'; - const KEY_APP_ID_PRODUCTION = 'fintecture_app_id_production'; - const KEY_APP_SECRET_SANDBOX = 'fintecture_app_secret_sandbox'; - const KEY_APP_SECRET_PRODUCTION = 'fintecture_app_secret_production'; - const KEY_PRIVATE_KEY_SANDBOX = 'custom_file_upload_sandbox'; - const KEY_PRIVATE_KEY_PRODUCTION = 'custom_file_upload_production'; - const KEY_REFUND_STATUSES_ACTIVE = 'refund_statuses_active'; - const KEY_EXPIRATION_ACTIVE = 'expiration_active'; - const KEY_EXPIRATION_AFTER = 'expiration_after'; - const KEY_INVOICING_ACTIVE = 'invoicing_active'; - const KEY_ALTERNATIVE_METHOD_ACTIVE = 'alternative_method_active'; - const KEY_ALTERNATIVE_METHOD = 'alternative_method'; - const KEY_CHECKOUT_DESIGN_SELECTION = 'checkout_design_selection'; - const KEY_CUSTOM_RECONCILIATION_FIELD_ACTIVE = 'custom_reconciliation_field_active'; - const KEY_CUSTOM_RECONCILIATION_FIELD = 'custom_reconciliation_field'; - const KEY_RECOMMEND_IT_BADGE = 'recommend_it_badge'; - const KEY_FIRST_POSITION_ACTIVE = 'first_position_active'; - const KEY_FIRST_POSITION_AMOUNT = 'first_position_amount'; + public const CODE = 'fintecture'; + public const VERSION = '3.5.6'; + + public const KEY_SHOP_NAME = 'general/store_information/name'; + public const KEY_ACTIVE = 'active'; + public const KEY_ALLOW_SPECIFIC = 'allowspecific'; + public const KEY_SPECIFIC_COUNTRY = 'specificcountry'; + public const KEY_ENVIRONMENT = 'environment'; + public const KEY_APP_ID_SANDBOX = 'fintecture_app_id_sandbox'; + public const KEY_APP_ID_PRODUCTION = 'fintecture_app_id_production'; + public const KEY_APP_SECRET_SANDBOX = 'fintecture_app_secret_sandbox'; + public const KEY_APP_SECRET_PRODUCTION = 'fintecture_app_secret_production'; + public const KEY_PRIVATE_KEY_SANDBOX = 'custom_file_upload_sandbox'; + public const KEY_PRIVATE_KEY_PRODUCTION = 'custom_file_upload_production'; + public const KEY_REFUND_STATUSES_ACTIVE = 'refund_statuses_active'; + public const KEY_EXPIRATION_ACTIVE = 'expiration_active'; + public const KEY_EXPIRATION_AFTER = 'expiration_after'; + public const KEY_INVOICING_ACTIVE = 'invoicing_active'; + public const KEY_ALTERNATIVE_METHOD_ACTIVE = 'alternative_method_active'; + public const KEY_ALTERNATIVE_METHOD = 'alternative_method'; + public const KEY_CHECKOUT_DESIGN_SELECTION = 'checkout_design_selection'; + public const KEY_CUSTOM_RECONCILIATION_FIELD_ACTIVE = 'custom_reconciliation_field_active'; + public const KEY_CUSTOM_RECONCILIATION_FIELD = 'custom_reconciliation_field'; + public const KEY_RECOMMEND_IT_BADGE = 'recommend_it_badge'; + public const KEY_FIRST_POSITION_ACTIVE = 'first_position_active'; + public const KEY_FIRST_POSITION_AMOUNT = 'first_position_amount'; public function getShopName(): ?string { diff --git a/Gateway/Http/Sdk.php b/Gateway/Http/Sdk.php index 28c98b2..4964476 100644 --- a/Gateway/Http/Sdk.php +++ b/Gateway/Http/Sdk.php @@ -85,32 +85,44 @@ public function validateConfigValue(): bool */ public function getPaymentMethods() { + if (!$this->isPisClientInstantiated()) { + $this->fintectureLogger->warning('SDK not initialized; skip payment methods'); + + return false; + } + $hasPaymentMethodsInCache = $this->operateCustomCache->get('payment_methods'); if (!is_null($hasPaymentMethodsInCache)) { return $hasPaymentMethodsInCache; } - $pisToken = $this->pisClient->token->generate(); - if (!$pisToken->error) { - $this->pisClient->setAccessToken($pisToken); // set token of PIS client - } else { - throw new \Exception($pisToken->errorMsg); - } + try { + $pisToken = $this->pisClient->token->generate(); + if (!$pisToken->error) { + $this->pisClient->setAccessToken($pisToken); // set token of PIS client + } else { + throw new \Exception($pisToken->errorMsg); + } - $apiResponse = $this->pisClient->application->get(['with_payment_methods' => true]); - if (!$apiResponse->error) { - $paymentMethods = []; - if (isset($apiResponse->result->data->attributes->payment_methods)) { - foreach ($apiResponse->result->data->attributes->payment_methods as $paymentMethod) { - $paymentMethods[] = $paymentMethod->id; - } + $apiResponse = $this->pisClient->application->get(['with_payment_methods' => true]); + if (!$apiResponse->error) { + $paymentMethods = []; + if (isset($apiResponse->result->data->attributes->payment_methods)) { + foreach ($apiResponse->result->data->attributes->payment_methods as $paymentMethod) { + $paymentMethods[] = $paymentMethod->id; + } - $this->operateCustomCache->save('payment_methods', $paymentMethods, 600); + $this->operateCustomCache->save('payment_methods', $paymentMethods, 600); - return $paymentMethods; + return $paymentMethods; + } } - } - return false; + return false; + } catch (\Exception $e) { + $this->fintectureLogger->error('getPaymentMethods exception', ['exception' => $e]); + + return false; + } } } diff --git a/Model/AlternativeMethod.php b/Model/AlternativeMethod.php index 35cd86c..6697a69 100644 --- a/Model/AlternativeMethod.php +++ b/Model/AlternativeMethod.php @@ -8,8 +8,8 @@ class AlternativeMethod implements OptionSourceInterface { - const ALTERNATIVE_METHOD_QRCODE = 'qrcode'; - const ALTERNATIVE_METHOD_SEND = 'send'; + public const ALTERNATIVE_METHOD_QRCODE = 'qrcode'; + public const ALTERNATIVE_METHOD_SEND = 'send'; public function toOptionArray(): array { diff --git a/Model/Cache/Type.php b/Model/Cache/Type.php index 61a4e39..8ff8389 100644 --- a/Model/Cache/Type.php +++ b/Model/Cache/Type.php @@ -6,8 +6,8 @@ class Type extends \Magento\Framework\Cache\Frontend\Decorator\TagScope { - const TYPE_IDENTIFIER = 'fintecture_cache'; - const CACHE_TAG = 'FINTECTURE_CACHE'; + public const TYPE_IDENTIFIER = 'fintecture_cache'; + public const CACHE_TAG = 'FINTECTURE_CACHE'; /** * @param \Magento\Framework\App\Cache\Type\FrontendPool $cacheFrontendPool diff --git a/README.md b/README.md index 93eef30..b57deea 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Fintecture Payment module for Magento 2.4 & 2.3 +# Fintecture module for Magento 2.4 & 2.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) +[![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) Fintecture is a Fintech that has a payment solution via bank transfer available at https://www.fintecture.com. @@ -43,7 +43,7 @@ To enable it, you must install this dependency: Go to Stores > Configuration > Sales > Payment methods. - Select environment (sandbox/production) -- Fill APP ID, APP secret and private key based on the selected environment (https://console.fintecture.com/) +- Fill APP ID, APP secret and private key based on the selected environment (https://console.fintecture.com) - Test your connection (if everything is ok you should have a green message) - Don't forget to enable the payment method unless it won't be displayed in the front end diff --git a/Setup/Patch/Data/RemoveFintectureBankTypeConfig.php b/Setup/Patch/Data/RemoveFintectureBankTypeConfig.php index 7d6deb0..7a65065 100644 --- a/Setup/Patch/Data/RemoveFintectureBankTypeConfig.php +++ b/Setup/Patch/Data/RemoveFintectureBankTypeConfig.php @@ -43,6 +43,6 @@ public function getAliases() public static function getVersion(): string { - return '3.5.5'; + return '3.5.6'; } } diff --git a/composer.json b/composer.json index 54a08b8..6b7740a 100644 --- a/composer.json +++ b/composer.json @@ -1,58 +1,61 @@ { - "name": "fintecture/payment", - "description": "Fintecture Payment", - "keywords": ["payment","bank"], - "homepage": "https://github.com/Fintecture/magento", - "support": { - "email": "contact@fintecture.com" - }, - "type": "magento2-module", - "version": "3.5.5", - "license": [ - "GPL-3.0" - ], - "require": { - "php": ">=7.2", - "ext-json": "*", - "ext-openssl": "*", - "magento/framework": ">=100", - "magento/module-developer": ">=100", - "magento/module-payment": ">=100", - "magento/module-checkout": ">=100", - "magento/module-sales": ">=100", - "fintecture/fintecture-sdk-php": "^2.3", - "symfony/http-client": "*", - "nyholm/psr7": "*" - }, - "require-dev": { - "phpstan/phpstan": "^1", - "bitexpert/phpstan-magento": "^0.30.0", - "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/extension-installer": "^1.1", - "phpunit/phpunit": "*" - }, - "suggest": { - "chillerlan/php-qrcode": "QR Code library for payment with \"Login as Customer\" feature enabled" - }, - "repositories": [ - { - "type": "composer", - "url": "https://repo.magento.com/" - } + "name": "fintecture/payment", + "description": "Fintecture Payer par Banque (Pay by Bank) enables users to pay securely and directly from their bank account.", + "keywords": [ + "payment", + "bank" + ], + "homepage": "https://github.com/Fintecture/magento", + "support": { + "email": "contact@fintecture.com" + }, + "type": "magento2-module", + "version": "3.5.6", + "license": [ + "GPL-3.0" + ], + "require": { + "php": ">=7.2", + "ext-json": "*", + "ext-openssl": "*", + "magento/framework": "^102.0 || ^103.0", + "magento/module-developer": ">=100", + "magento/module-payment": ">=100", + "magento/module-checkout": ">=100", + "magento/module-sales": ">=100", + "symfony/http-client": "*", + "nyholm/psr7": "*", + "fintecture/fintecture-sdk-php": "^2.3" + }, + "require-dev": { + "phpstan/phpstan": "^1", + "bitexpert/phpstan-magento": "^0.30.0", + "phpstan/phpstan-deprecation-rules": "^1.0", + "phpstan/extension-installer": "^1.1", + "phpunit/phpunit": "*" + }, + "suggest": { + "chillerlan/php-qrcode": "QR Code library for payment with \"Login as Customer\" feature enabled" + }, + "repositories": [ + { + "type": "composer", + "url": "https://repo.magento.com/" + } + ], + "autoload": { + "files": [ + "registration.php" ], - "autoload": { - "files": [ - "registration.php" - ], - "psr-4": { - "Fintecture\\Payment\\": "." - } - }, - "config": { - "allow-plugins": { - "magento/composer-dependency-version-audit-plugin": true, - "phpstan/extension-installer": true, - "php-http/discovery": true - } + "psr-4": { + "Fintecture\\Payment\\": "." + } + }, + "config": { + "allow-plugins": { + "magento/composer-dependency-version-audit-plugin": true, + "phpstan/extension-installer": true, + "php-http/discovery": true } + } } diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index 12e0b96..b3129f5 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -290,85 +290,6 @@ - - - - - fintecture-admin-section - Fintecture\Payment\Block\Adminhtml\System\Config\Fieldset\Payment - - - Fintecture\Payment\Block\Adminhtml\System\Config\Renderer\BnplMessageRenderer - - - - Fintecture\Payment\Block\Adminhtml\System\Config\Information\Documentation - - - - Fintecture\Payment\Block\Adminhtml\System\Config\Renderer\BnplRenderer - - - - - - If you activate this feature without having the option on your Fintecture account, your users will see an error on the payment page. - Magento\Config\Model\Config\Source\Yesno - payment/fintecture_bnpl/active - - - - - - Fintecture\Payment\Block\Adminhtml\System\Config\Renderer\BnplRenderer - - - - - - validate-number - payment/fintecture_bnpl/sort_order - - - - - - - Fintecture\Payment\Block\Adminhtml\System\Config\Renderer\BnplRenderer - - - - - - Magento\Config\Model\Config\Source\Yesno - Recommend the payment method on checkout page - payment/fintecture_bnpl/recommend_bnpl_badge - - - - - - - Fintecture\Payment\Block\Adminhtml\System\Config\Renderer\BnplRenderer - - - - - Fintecture\Payment\Block\Adminhtml\System\Config\Form\Version - - - - - - - - Fintecture\Payment\Model\StatusMapping - payment/fintecture/order_created_status - - - - - \ No newline at end of file diff --git a/etc/config.xml b/etc/config.xml index c818a27..fd0eaa1 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -45,26 +45,6 @@ 0 0 - - 0 - 0 - FintectureBnplFacade - initialize - 1 - 1 - 1 - 1 - 1 - 1 - 0 - new - EUR - 1 - Fintecture - 0 - FR - 0 - diff --git a/etc/module.xml b/etc/module.xml index d48b466..94b3a6e 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,7 +1,7 @@ - + diff --git a/etc/payment.xml b/etc/payment.xml index 08ef131..94687c7 100644 --- a/etc/payment.xml +++ b/etc/payment.xml @@ -2,17 +2,9 @@ - - - - - 1 - - 1 - diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 1f948ae..f82c463 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -46,10 +46,10 @@ Fintecture is a payment institution supervised by the Banque de France and the A Fintecture private key,Fintecture private key, First position depending of cart amount,First position depending of cart amount, How it works?,How it works?, -How to make an immediate transfer?,How to make an immediate transfer?, +How to make an Immediate Transfer?,How to make an Immediate Transfer?, "If the payment has been made, then the order will be validated in a few moments.","If the payment has been made, then the order will be validated in a few moments.", "If you activate this feature without having the option on your Fintecture account, your users will see an error on the payment page.","If you activate this feature without having the option on your Fintecture account, your users will see an error on the payment page.", -immediate transfer,immediate transfer, +Immediate Transfer,Immediate Transfer, Immediate Transfer,Immediate Transfer, Immediate Transfer & Smart Transfer,Immediate Transfer & Smart Transfer, In 30 days,In 30 days, @@ -104,7 +104,7 @@ Send by Email,Send by Email, Send by SMS,Send by SMS, Settings,Settings, Short version,Short version, -Smart Transfer,Smart Transfer, +Smart Transfer,Virement Intelligent, Some fields are empty,Some fields are empty, "Sorry, something went wrong. Please try again later.","Sorry, something went wrong. Please try again later.", Sort order,Sort order, diff --git a/i18n/es_ES.csv b/i18n/es_ES.csv index ddec2ad..4fddf77 100644 --- a/i18n/es_ES.csv +++ b/i18n/es_ES.csv @@ -46,10 +46,10 @@ Fintecture is a payment institution supervised by the Banque de France and the A Fintecture private key,Clave privada de Fintecture, First position depending of cart amount,Primera posición en función del importe del carrito, How it works?,¿Cómo funciona?, -How to make an immediate transfer?,¿Cómo hacer una transferencia inmediata?, +How to make an Immediate Transfer?,¿Cómo hacer una transferencia inmediata?, "If the payment has been made, then the order will be validated in a few moments.","Si se ha efectuado el pago, el pedido se validará en unos instantes.", "If you activate this feature without having the option on your Fintecture account, your users will see an error on the payment page.","Si activa esta función sin tener la opción en su cuenta de Fintecture, sus usuarios verán un error en la página de pago.", -immediate transfer,Transferencia inmediata, +Immediate Transfer,Transferencia inmediata, Immediate Transfer,Transferencia inmediata, Immediate Transfer & Smart Transfer,Transferencia inmediata y transferencia inteligente, In 30 days,En 30 días, @@ -98,7 +98,7 @@ Return to the homepage,Volver a la página de inicio, Sandbox,Sandbox, Scan this QR Code to pay with Fintecture,Escanee este código QR para pagar con Fintecture, Secured connection to your bank by,Conexión segura con su banco a través de, -Secured wire transfer,Transferencia bancaria segura, +Secured wire transfer,Secured wire transfer, Select your bank,Selecciona tu banco, Send by Email,Enviar por correo, Send by SMS,Enviar por SMS, @@ -129,7 +129,7 @@ The refund of %1€ has been made.,Se ha efectuado el reembolso del %1€., This section is intended for advanced users. Changing the settings may impact the proper functioning of your system.,Esta sección está destinada a usuarios avanzados. La modificación de los ajustes puede afectar al correcto funcionamiento de su sistema., Title,Título, Today,Hoy, -traditional bank transfer,transferencia bancaria tradicional, +traditional bank transfer,traditional bank transfer, Unhandled status.,Estado sin gestionar., We can't place the order.,No podemos realizar el pedido., Wire transfer,Transferencia bancaria, diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 6211c25..881e95a 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -46,11 +46,11 @@ Fintecture is a payment institution supervised by the Banque de France and the A Fintecture private key,Clé privée de Fintecture, First position depending of cart amount,Première position en fonction du montant du panier, How it works?,Comment ça marche ?, -How to make an immediate transfer?,Comment faire un virement immédiat ?, +How to make an Immediate Transfer?,Comment faire un Virement Immédiat ?, "If the payment has been made, then the order will be validated in a few moments.","Si le paiement a été effectué, la commande sera validée dans quelques instants.", "If you activate this feature without having the option on your Fintecture account, your users will see an error on the payment page.","Si vous activez cette fonctionnalité sans avoir l'option sur votre compte Fintecture, vos utilisateurs verront une erreur sur la page de paiement.", -immediate transfer,virement immédiat, -Immediate Transfer,Virement immédiat, +Immediate Transfer,Virement Immédiat, +Immediate Transfer,Virement Immédiat, Immediate Transfer & Smart Transfer,Virement Immédiat et Virement Intelligent, In 30 days,Dans 30 jours, In minutes. Minimum value: 3,En minutes. Valeur minimale : 3, diff --git a/view/frontend/templates/html/checkout/order/error.phtml b/view/frontend/templates/html/checkout/order/error.phtml index 0fc4f16..5291eae 100644 --- a/view/frontend/templates/html/checkout/order/error.phtml +++ b/view/frontend/templates/html/checkout/order/error.phtml @@ -17,7 +17,7 @@ $status = $block->getPaymentStatus();
-

the merchant or Fintecture by email at %2 or via chat.', $block->getUrl('contact'), 'support@fintecture.com', 'https:///help.fintecture.com'); ?>

+

the merchant or Fintecture by email at %2 or via chat.', $block->getUrl('contact'), 'support@fintecture.com', 'https://help.fintecture.com'); ?>

\ No newline at end of file diff --git a/view/frontend/web/template/payment/fintecture.html b/view/frontend/web/template/payment/fintecture.html index d17d60e..8580576 100644 --- a/view/frontend/web/template/payment/fintecture.html +++ b/view/frontend/web/template/payment/fintecture.html @@ -12,7 +12,7 @@ - + @@ -36,11 +36,11 @@ - , + ,

-

+

@@ -49,25 +49,25 @@
-

+ 1.

-

+ 2.

-

+ 3.

-

+ 4.

From b271a41b58dc5a3e484dfc0ccb24ea66510267f2 Mon Sep 17 00:00:00 2001 From: "quentin.patras" Date: Tue, 25 Nov 2025 09:50:02 +0100 Subject: [PATCH 2/2] 3.6.0 Comply with new validation rules from Magento --- CHANGELOG.md | 4 +- Gateway/Config/Config.php | 2 +- README.md | 2 +- .../Data/RemoveFintectureBankTypeConfig.php | 2 +- composer.json | 2 +- etc/module.xml | 2 +- .../templates/system/config/button.phtml | 5 +- .../templates/html/checkout/order/error.phtml | 35 ++++++++-- .../html/checkout/order/success.phtml | 21 ++++-- view/frontend/templates/html/qrcode.phtml | 66 +++++++++++++------ view/frontend/templates/html/send.phtml | 51 ++++++++------ 11 files changed, 132 insertions(+), 60 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e77cb6..11b1ae2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,10 +4,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/). -## [3.5.6] - 2025-11-24 +## [3.6.0] - 2025-11-24 - Fix a typo on a Fintecture URL -- Internal fix +- Internal fixes ## [3.5.5] - 2025-02-24 diff --git a/Gateway/Config/Config.php b/Gateway/Config/Config.php index 87bb108..f4629c5 100644 --- a/Gateway/Config/Config.php +++ b/Gateway/Config/Config.php @@ -7,7 +7,7 @@ class Config extends BaseConfig { public const CODE = 'fintecture'; - public const VERSION = '3.5.6'; + public const VERSION = '3.6.0'; public const KEY_SHOP_NAME = 'general/store_information/name'; public const KEY_ACTIVE = 'active'; diff --git a/README.md b/README.md index b57deea..8eef0f0 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Fintecture module for Magento 2.4 & 2.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) +[![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) Fintecture is a Fintech that has a payment solution via bank transfer available at https://www.fintecture.com. diff --git a/Setup/Patch/Data/RemoveFintectureBankTypeConfig.php b/Setup/Patch/Data/RemoveFintectureBankTypeConfig.php index 7a65065..5bd58fb 100644 --- a/Setup/Patch/Data/RemoveFintectureBankTypeConfig.php +++ b/Setup/Patch/Data/RemoveFintectureBankTypeConfig.php @@ -43,6 +43,6 @@ public function getAliases() public static function getVersion(): string { - return '3.5.6'; + return '3.6.0'; } } diff --git a/composer.json b/composer.json index 6b7740a..8e3a72f 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "email": "contact@fintecture.com" }, "type": "magento2-module", - "version": "3.5.6", + "version": "3.6.0", "license": [ "GPL-3.0" ], diff --git a/etc/module.xml b/etc/module.xml index 94b3a6e..0140a02 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,7 +1,7 @@ - + diff --git a/view/adminhtml/templates/system/config/button.phtml b/view/adminhtml/templates/system/config/button.phtml index 31c9db5..18d8d9f 100644 --- a/view/adminhtml/templates/system/config/button.phtml +++ b/view/adminhtml/templates/system/config/button.phtml @@ -5,13 +5,12 @@ declare(strict_types=1); use Fintecture\Payment\Block\System\Config\Button; /** @var Button $block */ -echo $block->getButtonHtml(); -?> +?>getButtonHtml() ?>
\ No newline at end of file diff --git a/view/frontend/templates/html/checkout/order/error.phtml b/view/frontend/templates/html/checkout/order/error.phtml index 5291eae..4be15ee 100644 --- a/view/frontend/templates/html/checkout/order/error.phtml +++ b/view/frontend/templates/html/checkout/order/error.phtml @@ -6,18 +6,41 @@ $status = $block->getPaymentStatus();
- -

+ +

+ escapeHtml(__( + 'The payment has been cancelled and the transaction could not be completed.' + )) ?> +

- -

+ +

+ escapeHtml(__( + 'The payment has failed. Please select another bank or another payment method.' + )) ?> +

- -

the merchant or Fintecture by email at %2 or via chat.', $block->getUrl('contact'), 'support@fintecture.com', 'https://help.fintecture.com'); ?>

+ +

+ the merchant or Fintecture ' + . 'by email at %2 or via chat.', + $block->escapeUrl($block->getUrl('contact')), + $block->escapeHtml('support@fintecture.com'), + $block->escapeUrl('https://help.fintecture.com') + ) ?> +

\ No newline at end of file diff --git a/view/frontend/templates/html/checkout/order/success.phtml b/view/frontend/templates/html/checkout/order/success.phtml index b2f5824..36c556b 100644 --- a/view/frontend/templates/html/checkout/order/success.phtml +++ b/view/frontend/templates/html/checkout/order/success.phtml @@ -3,12 +3,25 @@ ?> getPaymentStatus() === 'payment_created'): ?>
- -

+ +

+ escapeHtml(__( + 'Your payment with Fintecture has been successfully processed!' + )) ?> +

getPaymentStatus() === 'payment_pending'): ?>
- -

+ +

+ escapeHtml(__( + '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.' + )) ?> +

\ No newline at end of file diff --git a/view/frontend/templates/html/qrcode.phtml b/view/frontend/templates/html/qrcode.phtml index 7e6da7f..0315459 100644 --- a/view/frontend/templates/html/qrcode.phtml +++ b/view/frontend/templates/html/qrcode.phtml @@ -4,40 +4,64 @@
getData('confirm')) { - ?> -

+ ?> +

escapeHtml(__('Order validated')) ?>

-

+

+ escapeHtml(__( + 'If the payment has been made, then the order will be validated in a few moments.' + )) ?> +

-

getData('amount'); ?> getData('currency'); ?>

-

getData('reference'); ?>

-

getData('sessionId'); ?>

+

+ + escapeHtml($block->getData('amount')) ?> + escapeHtml($block->getData('currency')) ?> + +

+

escapeHtml($block->getData('reference')) ?>

+

escapeHtml($block->getData('sessionId')) ?>

- - + + escapeHtml(__('Return to the homepage')) ?> - -

+ ?> +

escapeHtml(__('Scan this QR Code to pay with Fintecture')) ?>

- + -

getData('amount'); ?> getData('currency'); ?>

-

getData('reference'); ?>

-

getData('sessionId'); ?>

+

+ + escapeHtml($block->getData('amount')) ?> + escapeHtml($block->getData('currency')) ?> + +

+

escapeHtml($block->getData('reference')) ?>

+

escapeHtml($block->getData('sessionId')) ?>

- - + + escapeHtml(__('Continue')) ?> - -
+
- + escapeHtml(__('Secured connection to your bank by')) ?> - Fintecture + Fintecture
\ No newline at end of file diff --git a/view/frontend/templates/html/send.phtml b/view/frontend/templates/html/send.phtml index 61634f0..f8d3584 100644 --- a/view/frontend/templates/html/send.phtml +++ b/view/frontend/templates/html/send.phtml @@ -4,39 +4,52 @@
getData('step') !== 2) { - ?> -

+ ?> +

escapeHtml(__('Choose how to send your payment link')) ?>

-
- - + -

+ ?> +

escapeHtml(__('Your payment link has been sent successfully')) ?>

- + -

getData('amount'); ?> getData('currency'); ?>

-

getData('reference'); ?>

-

getData('sessionId'); ?>

+

+ + escapeHtml($block->getData('amount')) ?> + escapeHtml($block->getData('currency')) ?> + +

+

escapeHtml($block->getData('reference')) ?>

+

escapeHtml($block->getData('sessionId')) ?>

- - + + escapeHtml(__('Return to the homepage')) ?> - -
+
- + escapeHtml(__('Secured connection to your bank by')) ?> - Fintecture + Fintecture
\ No newline at end of file