Skip to content
Open

3.7.0 #103

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion Controller/WebhookAbstract.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ abstract class WebhookAbstract implements CsrfAwareActionInterface
protected const ALLOWED_WEBHOOK_TYPES = [
'PayByBank',
'Refund',
'BuyNowPayLater',
'ManualTransfer',
'RequestToPay',
];
Expand Down
12 changes: 1 addition & 11 deletions Gateway/Config/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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');
Expand Down
29 changes: 0 additions & 29 deletions Gateway/HandlePayment.php
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
]);
}
}
}
}

Expand Down
32 changes: 1 addition & 31 deletions Helper/Fintecture.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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.'),
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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();
Expand All @@ -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);
}
}
7 changes: 0 additions & 7 deletions Helper/Stats.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -18,9 +17,6 @@ class Stats
/** @var Config */
protected $config;

/** @var BnplConfig */
protected $bnplConfig;

/** @var FintectureLogger */
protected $fintectureLogger;

Expand All @@ -38,15 +34,13 @@ class Stats

public function __construct(
Config $config,
BnplConfig $bnplConfig,
FintectureLogger $fintectureLogger,
ResourceConnection $resourceConnection,
ProductMetadataInterface $productMetadata,
PaymentConfig $paymentConfig,
StoreManagerInterface $storeManager
) {
$this->config = $config;
$this->bnplConfig = $bnplConfig;
$this->fintectureLogger = $fintectureLogger;
$this->resourceConnection = $resourceConnection;
$this->productMetadata = $productMetadata;
Expand Down Expand Up @@ -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(),
];
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"email": "contact@fintecture.com"
},
"type": "magento2-module",
"version": "3.6.2",
"version": "3.7.0",
"license": [
"GPL-3.0"
],
Expand Down
1 change: 0 additions & 1 deletion etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
<fintecture_app_secret_production backend_model="Magento\Config\Model\Config\Backend\Encrypted"/>
<new_order_status>pending</new_order_status>
<payment_created_status>processing</payment_created_status>
<order_created_status>fintecture_order_created</order_created_status>
<payment_pending_status>pending_payment</payment_pending_status>
<payment_overpaid_status>fintecture_overpaid</payment_overpaid_status>
<payment_partial_status>fintecture_partial</payment_partial_status>
Expand Down
29 changes: 0 additions & 29 deletions etc/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,13 @@
</arguments>
</virtualType>

<virtualType name="FintectureBnplFacade" type="Magento\Payment\Model\Method\Adapter">
<arguments>
<argument name="code" xsi:type="const">Fintecture\Payment\Gateway\Config\BnplConfig::CODE</argument>
<argument name="formBlockType" xsi:type="string">Magento\Payment\Block\Form</argument>
<argument name="infoBlockType" xsi:type="string">Fintecture\Payment\Block\Info</argument>
<argument name="valueHandlerPool" xsi:type="object">FintectureBnplValueHandlerPool</argument>
<argument name="commandPool" xsi:type="object">FintectureCommandPool</argument>
</arguments>
</virtualType>

<!-- Configuration reader -->
<type name="Fintecture\Payment\Gateway\Config\Config">
<arguments>
<argument name="methodCode" xsi:type="const">Fintecture\Payment\Gateway\Config\Config::CODE</argument>
</arguments>
</type>

<type name="Fintecture\Payment\Gateway\Config\BnplConfig">
<arguments>
<argument name="methodCode" xsi:type="const">Fintecture\Payment\Gateway\Config\BnplConfig::CODE</argument>
</arguments>
</type>

<!-- Value handlers infrastructure -->
<virtualType name="FintectureValueHandlerPool" type="Magento\Payment\Gateway\Config\ValueHandlerPool">
<arguments>
Expand All @@ -50,19 +34,6 @@
</arguments>
</virtualType>

<virtualType name="FintectureBnplValueHandlerPool" type="Magento\Payment\Gateway\Config\ValueHandlerPool">
<arguments>
<argument name="handlers" xsi:type="array">
<item name="default" xsi:type="string">FintectureBnplConfigValueHandler</item>
</argument>
</arguments>
</virtualType>
<virtualType name="FintectureBnplConfigValueHandler" type="Magento\Payment\Gateway\Config\ConfigValueHandler">
<arguments>
<argument name="configInterface" xsi:type="object">Fintecture\Payment\Gateway\Config\BnplConfig</argument>
</arguments>
</virtualType>

<!-- Commands infrastructure -->
<virtualType name="FintectureCommandPool" type="Magento\Payment\Gateway\Command\CommandPool">
<arguments>
Expand Down
1 change: 0 additions & 1 deletion etc/frontend/di.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ ObjectManager/etc/config.xsd">
<arguments>
<argument name="configProviders" xsi:type="array">
<item name="fintecture_config_provider" xsi:type="object">Fintecture\Payment\Model\Ui\ConfigProvider</item>
<item name="fintecture_bnpl_config_provider" xsi:type="object">Fintecture\Payment\Model\Ui\BnplConfigProvider</item>
</argument>
</arguments>
</type>
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Fintecture_Payment" setup_version="3.6.2">
<module name="Fintecture_Payment" setup_version="3.7.0">
<sequence>
<module name="Magento_Sales"/>
<module name="Magento_Payment"/>
Expand Down
7 changes: 0 additions & 7 deletions i18n/en_US.csv
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -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.<br>Collect payments without any credit limit. Reduce your transaction fees by 40%!,Pay instantly and securely directly from your bank account.<br>Collect payments without any credit limit. Reduce your transaction fees by 40%!,
Pay Now,Pay Now,
Payment by QR Code,Payment by QR Code,
Expand Down Expand Up @@ -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.,
Expand All @@ -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,
Expand Down
Loading