diff --git a/CHANGELOG.md b/CHANGELOG.md index e331a19..bdadff0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ 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.7.0] - 2026-04-14 + +### Removed + +- Buy Now Pay Later (BNPL) payment method + ## [3.6.2] - 2026-02-26 - Internal fixes diff --git a/Controller/WebhookAbstract.php b/Controller/WebhookAbstract.php index 9c544db..a158ec9 100644 --- a/Controller/WebhookAbstract.php +++ b/Controller/WebhookAbstract.php @@ -50,7 +50,6 @@ abstract class WebhookAbstract implements CsrfAwareActionInterface protected const ALLOWED_WEBHOOK_TYPES = [ 'PayByBank', 'Refund', - 'BuyNowPayLater', 'ManualTransfer', 'RequestToPay', ]; diff --git a/Gateway/Config/Config.php b/Gateway/Config/Config.php index 29915f4..183e3d5 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.6.2'; + public const VERSION = '3.7.0'; public const KEY_SHOP_NAME = 'general/store_information/name'; public const KEY_ACTIVE = 'active'; @@ -185,16 +185,6 @@ public function getPaymentCreatedStatus(): string return $status; } - public function getOrderCreatedStatus(): string - { - $status = $this->getValue('order_created_status'); - if (!$status) { - $status = 'fintecture_order_created'; - } - - return $status; - } - public function getPaymentPendingStatus(): string { $status = $this->getValue('payment_pending_status'); diff --git a/Gateway/HandlePayment.php b/Gateway/HandlePayment.php index 99ced26..77f014f 100644 --- a/Gateway/HandlePayment.php +++ b/Gateway/HandlePayment.php @@ -223,35 +223,6 @@ public function sendInvoice(Order $order, array $params): void $order->setIsCustomerNotified(true); $this->orderRepository->save($order); - - if ($params['status'] === 'order_created') { - // Update invoice_reference field for BNPL orders - $data = [ - 'data' => [ - 'attributes' => [ - 'invoice_reference' => '#' . $invoice->getIncrementId(), - ], - ], - ]; - - $pisToken = $this->sdk->pisClient->token->generate(); - if (!$pisToken->error) { - $this->sdk->pisClient->setAccessToken($pisToken); // set token of PIS client - } else { - $this->fintectureLogger->error("Can't update invoice_reference field", [ - 'message' => $pisToken->errorMsg, - 'incrementOrderId' => $order->getIncrementId(), - ]); - } - - $apiResponse = $this->sdk->pisClient->payment->update($params['sessionId'], $data); - if ($apiResponse->error) { - $this->fintectureLogger->error("Can't update invoice_reference field", [ - 'message' => $apiResponse->errorMsg, - 'incrementOrderId' => $order->getIncrementId(), - ]); - } - } } } diff --git a/Helper/Fintecture.php b/Helper/Fintecture.php index 12e256c..f0166e4 100644 --- a/Helper/Fintecture.php +++ b/Helper/Fintecture.php @@ -26,10 +26,8 @@ class Fintecture extends AbstractHelper private const PAYMENT_COMMUNICATION = 'FINTECTURE-'; public const PIS_TYPE = 'PayByBank'; - public const RTP_TYPE = 'RequestToPay'; - public const BNPL_TYPE = 'BuyNowPayLater'; - public const BNPL_PAYMENT_METHOD = 'bnpl'; + public const RTP_TYPE = 'RequestToPay'; /** @var Config */ protected $config; @@ -199,10 +197,6 @@ public function getOrderStatus(array $params) 'status' => $this->config->getPaymentCreatedStatus(), 'state' => Order::STATE_PROCESSING, ], - 'order_created' => [ - 'status' => $this->config->getOrderCreatedStatus(), - 'state' => Order::STATE_PROCESSING, - ], 'payment_pending' => [ 'status' => $this->config->getPaymentPendingStatus(), 'state' => Order::STATE_PENDING_PAYMENT, @@ -260,7 +254,6 @@ public function getHistoryComment(array $params, bool $webhook = false): string // Mapping by payment_status $notesMapping = [ 'payment_created' => __('The payment has been validated by the bank.'), - 'order_created' => __('The order is confirmed, you will receive the funds under 30 days.'), 'payment_pending' => __('The bank is validating the payment.'), 'payment_partial' => __('A partial payment has been made.'), 'payment_unsuccessful' => __('The payment was rejected by either the payer or the bank.'), @@ -337,10 +330,6 @@ public function generatePayload(Order $order, string $type, string $method = '') $baseGrandTotal = (float) $order->getBaseGrandTotal(); $total = (string) round($baseGrandTotal, 2); - $baseTaxAmount = $order->getBaseTaxAmount(); - $totalMinusTaxes = $baseGrandTotal - $baseTaxAmount; - $netTotal = (string) round($totalMinusTaxes, 2); - $payload = [ 'meta' => [ 'psu_name' => $name, @@ -384,14 +373,6 @@ public function generatePayload(Order $order, string $type, string $method = '') $payload['meta']['method'] = $method; } - // BNPL - if ($type === Fintecture::BNPL_TYPE) { - $payload['meta']['payment_methods'][] = [ - 'id' => 'bnpl', - ]; - $payload['data']['attributes']['net_amount'] = $netTotal; - } - // Handle custom reconciliation field if enabled if ($this->config->isCustomReconciliationFieldActive() && $this->config->getCustomReconciliationField()) { $customReconciliationField = $this->config->getCustomReconciliationField(); @@ -405,15 +386,4 @@ public function generatePayload(Order $order, string $type, string $method = '') return $payload; } - - public function isBnplAvailable(): bool - { - $paymentMethods = $this->sdk->getPaymentMethods(); - - if (!$paymentMethods) { - return false; - } - - return in_array(self::BNPL_PAYMENT_METHOD, $paymentMethods); - } } diff --git a/Helper/Stats.php b/Helper/Stats.php index 818fead..21dd9f4 100644 --- a/Helper/Stats.php +++ b/Helper/Stats.php @@ -4,7 +4,6 @@ namespace Fintecture\Payment\Helper; -use Fintecture\Payment\Gateway\Config\BnplConfig; use Fintecture\Payment\Gateway\Config\Config; use Fintecture\Payment\Logger\Logger as FintectureLogger; use Fintecture\Payment\Model\Environment; @@ -18,9 +17,6 @@ class Stats /** @var Config */ protected $config; - /** @var BnplConfig */ - protected $bnplConfig; - /** @var FintectureLogger */ protected $fintectureLogger; @@ -38,7 +34,6 @@ class Stats public function __construct( Config $config, - BnplConfig $bnplConfig, FintectureLogger $fintectureLogger, ResourceConnection $resourceConnection, ProductMetadataInterface $productMetadata, @@ -46,7 +41,6 @@ public function __construct( StoreManagerInterface $storeManager ) { $this->config = $config; - $this->bnplConfig = $bnplConfig; $this->fintectureLogger = $fintectureLogger; $this->resourceConnection = $resourceConnection; $this->productMetadata = $productMetadata; @@ -105,7 +99,6 @@ public function getConfigurationSummary(): array 'module_production_app_id' => $this->config->getAppId(Environment::ENVIRONMENT_PRODUCTION), 'module_checkout_design' => $this->config->getCheckoutDesign(), 'module_recommended_it' => $this->config->isRecommendedItBadgeActive(), - 'module_recommended_bnpl' => $this->bnplConfig->isRecommendedBnplBadgeActive(), 'module_force_position' => $this->config->isFirstPositionActive(), 'module_force_position_min_amount' => $this->config->getFirstPositionAmount(), ]; diff --git a/composer.json b/composer.json index 73b175e..51dee3a 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ "email": "contact@fintecture.com" }, "type": "magento2-module", - "version": "3.6.2", + "version": "3.7.0", "license": [ "GPL-3.0" ], diff --git a/etc/config.xml b/etc/config.xml index fd0eaa1..c409642 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -26,7 +26,6 @@ pending processing - fintecture_order_created pending_payment fintecture_overpaid fintecture_partial diff --git a/etc/di.xml b/etc/di.xml index 33e0448..d18850f 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -13,16 +13,6 @@ - - - Fintecture\Payment\Gateway\Config\BnplConfig::CODE - Magento\Payment\Block\Form - Fintecture\Payment\Block\Info - FintectureBnplValueHandlerPool - FintectureCommandPool - - - @@ -30,12 +20,6 @@ - - - Fintecture\Payment\Gateway\Config\BnplConfig::CODE - - - @@ -50,19 +34,6 @@ - - - - FintectureBnplConfigValueHandler - - - - - - Fintecture\Payment\Gateway\Config\BnplConfig - - - diff --git a/etc/frontend/di.xml b/etc/frontend/di.xml index db60cbc..1a71e14 100644 --- a/etc/frontend/di.xml +++ b/etc/frontend/di.xml @@ -6,7 +6,6 @@ ObjectManager/etc/config.xsd"> Fintecture\Payment\Model\Ui\ConfigProvider - Fintecture\Payment\Model\Ui\BnplConfigProvider diff --git a/etc/module.xml b/etc/module.xml index a9ade1e..d7d66c6 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,7 +1,7 @@ - + diff --git a/i18n/en_US.csv b/i18n/en_US.csv index f82c463..36970c8 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -8,14 +8,12 @@ A problem occurred during the payment initiation with Fintecture. Please try aga Accepted payment,Accepted payment, Advanced settings,Advanced settings, All,All, -Allow your professional buyers to buy now and pay later directly from your check-out. An innovative solution made for B2B merchants looking to boost their sales.,Allow your professional buyers to buy now and pay later directly from your check-out. An innovative solution made for B2B merchants looking to boost their sales., Alternative payment methods for 'Login as Customer' feature,Alternative payment methods for 'Login as Customer' feature, Amount,Amount, An error has occurred during refund. Please check your account in the Fintecture console.,An error has occurred during refund. Please check your account in the Fintecture console., Automatic expiration of pending orders,Automatic expiration of pending orders, Automatic expiration of pending orders after,Automatic expiration of pending orders after, Bank type,Bank type, -Buy Now Pay Later,Buy Now Pay Later, Can't save the private key,Can't save the private key, Checkout design,Checkout design, Choose how to send your payment link,Choose how to send your payment link, @@ -52,7 +50,6 @@ How to make an Immediate Transfer?,How to make an Immediate Transfer?, Immediate Transfer,Immediate Transfer, Immediate Transfer,Immediate Transfer, Immediate Transfer & Smart Transfer,Immediate Transfer & Smart Transfer, -In 30 days,In 30 days, In minutes. Minimum value: 3,In minutes. Minimum value: 3, Invalid request,Invalid request, Invoicing,Invoicing, @@ -74,7 +71,6 @@ Partial payment,Partial payment, Partial refund,Partial refund, Pay,Pay, Pay for your purchases instantly and securely.,Pay for your purchases instantly and securely., -"Pay in 30 days, without fee","Pay in 30 days, without fee", Pay instantly and securely directly from your bank account.
Collect payments without any credit limit. Reduce your transaction fees by 40%!,Pay instantly and securely directly from your bank account.
Collect payments without any credit limit. Reduce your transaction fees by 40%!, Pay Now,Pay Now, Payment by QR Code,Payment by QR Code, @@ -110,7 +106,6 @@ Some fields are empty,Some fields are empty, Sort order,Sort order, Test connection,Test connection, The bank is validating the payment.,The bank is validating the payment., -"The order is confirmed, you will receive the funds under 30 days.","The order is confirmed, you will receive the funds under 30 days.", The payer got redirected to their bank and needs to authenticate.,The payer got redirected to their bank and needs to authenticate., The payment has been cancelled and the transaction could not be completed.,The payment has been cancelled and the transaction could not be completed., The payment has been completed with a higher amount.,The payment has been completed with a higher amount., @@ -128,12 +123,10 @@ The refund of %1€ has been made.,The refund of %1€ has been made., "This payment method is currently unavailable for your configured account. For further details, please consult the Fintecture console.","This payment method is currently unavailable for your configured account. For further details, please consult the Fintecture console.", This section is intended for advanced users. Changing the settings may impact the proper functioning of your system.,This section is intended for advanced users. Changing the settings may impact the proper functioning of your system., Title,Title, -Today,Today, traditional bank transfer,traditional bank transfer, Unhandled status.,Unhandled status., We can't place the order.,We can't place the order., Wire transfer,Wire transfer, -"You are a professional, buy now and pay in 30 days without any fees on the transaction.","You are a professional, buy now and pay in 30 days without any fees on the transaction.", You must proceed to the refund directly from the Fintecture Console with this type of account.,You must proceed to the refund directly from the Fintecture Console with this type of account., You will be automatically redirected to your secured bank environment to confirm your payment.,You will be automatically redirected to your secured bank environment to confirm your payment., Your payment link has been sent successfully,Your payment link has been sent successfully, diff --git a/i18n/es_ES.csv b/i18n/es_ES.csv index 4fddf77..e0f77fa 100644 --- a/i18n/es_ES.csv +++ b/i18n/es_ES.csv @@ -8,14 +8,12 @@ A problem occurred during the payment initiation with Fintecture. Please try aga Accepted payment,Pago aceptado, Advanced settings,Configuración avanzada, All,Todo, -Allow your professional buyers to buy now and pay later directly from your check-out. An innovative solution made for B2B merchants looking to boost their sales.,Permita a sus compradores profesionales comprar ahora y pagar más tarde directamente desde su caja. Una solución innovadora hecha para comerciantes B2B que buscan impulsar sus ventas., Alternative payment methods for 'Login as Customer' feature,"Métodos de pago alternativos para la función ""Iniciar sesión como cliente", Amount,Importe, An error has occurred during refund. Please check your account in the Fintecture console.,Se ha producido un error durante el reembolso. Compruebe su cuenta en la consola de Fintecture., Automatic expiration of pending orders,Vencimiento automático de órdenes pendientes, Automatic expiration of pending orders after,Expiración automática de órdenes pendientes después de, Bank type,Tipo de banco, -Buy Now Pay Later,"Comprar ahora, pagar después", Can't save the private key,No se puede guardar la clave privada, Checkout design,Diseño de caja, Choose how to send your payment link,Elija cómo enviar su enlace de pago, @@ -52,7 +50,6 @@ How to make an Immediate Transfer?,¿Cómo hacer una 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, In minutes. Minimum value: 3,En minutos. Valor mínimo: 3, Invalid request,Solicitud inválida, Invoicing,Facturación, @@ -74,7 +71,6 @@ Partial payment,Pago parcial, Partial refund,Reembolso parcial, Pay,Pagar, Pay for your purchases instantly and securely.,Paga tus compras de forma inmediata y segura., -"Pay in 30 days, without fee","Pague en 30 días, sin comisiones", Pay instantly and securely directly from your bank account.
Collect payments without any credit limit. Reduce your transaction fees by 40%!,Paga de forma inmediata y segura directamente desde tu aplicación bancaria.
Cobra sin límite de crédito. ¡Reduce tus gastos de transacción en un 40%!, Pay Now,Pagar ahora, Payment by QR Code,Pago mediante código QR, @@ -110,7 +106,6 @@ Some fields are empty,Algunos campos están vacíos, Sort order,Orden de clasificación, Test connection,Conexión de prueba, The bank is validating the payment.,El banco está validando el pago., -"The order is confirmed, you will receive the funds under 30 days.","Una vez confirmado el pedido, recibirá los fondos en menos de 30 días.", The payer got redirected to their bank and needs to authenticate.,El ordenante es redirigido a su banco y debe autenticarse., The payment has been cancelled and the transaction could not be completed.,El pago ha sido cancelado y la transacción no ha podido completarse., The payment has been completed with a higher amount.,El pago se ha completado con un importe superior., @@ -128,12 +123,10 @@ The refund of %1€ has been made.,Se ha efectuado el reembolso del %1€., "This payment method is currently unavailable for your configured account. For further details, please consult the Fintecture console.","Este método de pago no está disponible actualmente para su cuenta configurada. Para más detalles, consulte la consola de Fintecture.", 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,traditional bank transfer, Unhandled status.,Estado sin gestionar., We can't place the order.,No podemos realizar el pedido., Wire transfer,Transferencia bancaria, -"You are a professional, buy now and pay in 30 days without any fees on the transaction.","Usted es un profesional, compre ahora y pague en 30 días sin comisiones por la transacción.", You must proceed to the refund directly from the Fintecture Console with this type of account.,Debe proceder al reembolso directamente desde la Consola Fintecture con este tipo de cuenta., You will be automatically redirected to your secured bank environment to confirm your payment.,Serás redirigido automáticamente a tu aplicación bancaria segura para confirmar tu pago., Your payment link has been sent successfully,Su enlace de pago ha sido enviado, diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 881e95a..79b3938 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -8,14 +8,12 @@ A problem occurred during the payment initiation with Fintecture. Please try aga Accepted payment,Paiement accepté, Advanced settings,Paramètres avancés, All,Tous, -Allow your professional buyers to buy now and pay later directly from your check-out. An innovative solution made for B2B merchants looking to boost their sales.,Permettez à vos clients professionnels d'acheter maintenant et de payer plus tard directement depuis votre checkout. Une solution innovante conçue pour les marchands B2B qui cherchent à faire décoller leur chiffre d'affaires et booster leurs ventes., Alternative payment methods for 'Login as Customer' feature,"Méthodes de paiement alternatives pour la fonction ""Se connecter en tant que client""", Amount,Montant, An error has occurred during refund. Please check your account in the Fintecture console.,Une erreur s'est produite lors du remboursement. Veuillez vérifier votre compte dans la console Fintecture., Automatic expiration of pending orders,Expiration automatique des commandes en cours, Automatic expiration of pending orders after,Expiration automatique des commandes en attente après, Bank type,Type de banque, -Buy Now Pay Later,Buy Now Pay Later, Can't save the private key,Impossible d'enregistrer la clé privée, Checkout design,Affichage sur la page de paiement, Choose how to send your payment link,Choisissez comment envoyer votre lien de paiement, @@ -52,7 +50,6 @@ How to make an Immediate Transfer?,Comment faire un 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, Invalid request,Reqûete non valide, Invoicing,Facturation, @@ -74,7 +71,6 @@ Partial payment,Paiement partiel, Partial refund,Remboursement partiel, Pay,Payer, Pay for your purchases instantly and securely.,Payez vos achats instantanément et en toute sécurité., -"Pay in 30 days, without fee","Payer dans 30 jours, sans frais", Pay instantly and securely directly from your bank account.
Collect payments without any credit limit. Reduce your transaction fees by 40%!,Payez instantanément et en toute sécurité directement à partir de votre compte bancaire.
Collectez des paiements sans limite de crédit. Réduisez vos frais de transaction de 40% !, Pay Now,Payer immédiatement, Payment by QR Code,Paiement par QR Code, @@ -110,7 +106,6 @@ Some fields are empty,Certains champs sont vides, Sort order,Ordre de tri, Test connection,Test de connexion, The bank is validating the payment.,La banque valide le paiement., -"The order is confirmed, you will receive the funds under 30 days.","La commande est confirmée, vous recevrez les fonds sous 30 jours.", The payer got redirected to their bank and needs to authenticate.,Le payeur a été redirigé vers sa banque et doit s'authentifier., The payment has been cancelled and the transaction could not be completed.,Le paiement a été annulé et la transaction n’a pas pu aboutir., The payment has been completed with a higher amount.,Le paiement a été effectué avec un montant plus élevé., @@ -128,12 +123,10 @@ The refund of %1€ has been made.,Le remboursement de %1€ a été effectué., "This payment method is currently unavailable for your configured account. For further details, please consult the Fintecture console.","Ce mode de paiement est actuellement indisponible pour votre compte configuré. Pour plus de détails, veuillez consulter la console Fintecture.", This section is intended for advanced users. Changing the settings may impact the proper functioning of your system.,Cette section est destinée aux utilisateurs avancés. La modification des paramètres peut avoir un impact sur le bon fonctionnement de votre système., Title,Titre, -Today,Aujourd'hui, traditional bank transfer,virement bancaire traditionnel, Unhandled status.,Statut non géré., We can't place the order.,Nous ne pouvons pas passer la commande., Wire transfer,Virement bancaire, -"You are a professional, buy now and pay in 30 days without any fees on the transaction.","Vous êtes un professionnel, achetez maintenant et payez dans 30 jours sans aucun frais sur la transaction.", You must proceed to the refund directly from the Fintecture Console with this type of account.,Vous devez procéder au remboursement directement depuis la console Fintecture avec ce type de compte., You will be automatically redirected to your secured bank environment to confirm your payment.,Vous serez automatiquement redirigé vers votre environnement bancaire sécurisé pour confirmer votre paiement., Your payment link has been sent successfully,Votre lien de paiement a bien été envoyé, diff --git a/view/frontend/layout/checkout_index_index.xml b/view/frontend/layout/checkout_index_index.xml index c3bc8ed..c1a294a 100644 --- a/view/frontend/layout/checkout_index_index.xml +++ b/view/frontend/layout/checkout_index_index.xml @@ -27,9 +27,6 @@ true - - true - diff --git a/view/frontend/web/css/style.css b/view/frontend/web/css/style.css index 121fbf6..cd204a6 100644 --- a/view/frontend/web/css/style.css +++ b/view/frontend/web/css/style.css @@ -162,36 +162,6 @@ width: 25%; } -#bnpl-box { - display: block; - width: 95%; - margin-top: 20px; - padding: 20px; - border-radius: 8px; - background-color: #f8f8f8; -} - -.bnpl-head, -.bnpl-body { - display: flex; - justify-content: space-between; - margin-bottom: 10px; -} - -.bnpl-head span { - font-weight: bold; -} - -.fintecture-badge { - background-color: #2a45a7; - padding: 2px 8px; - font-size: 12px; - border-radius: 13px; - color: #FFF; - font-weight: 700; - margin-left: 10px; -} - .checkout-index-index .payment-method .payment-method-title label.label.img_label:after { display: inline-block; vertical-align: middle; diff --git a/view/frontend/web/js/view/payment/payments.js b/view/frontend/web/js/view/payment/payments.js index d2fbc2c..a8124d7 100644 --- a/view/frontend/web/js/view/payment/payments.js +++ b/view/frontend/web/js/view/payment/payments.js @@ -7,10 +7,6 @@ define([ { type: 'fintecture', component: 'Fintecture_Payment/js/view/payment/method-renderer/fintecture-payment', - }, - { - type: 'fintecture_bnpl', - component: 'Fintecture_Payment/js/view/payment/method-renderer/fintecture-bnpl', } ); return Component.extend({});