Skip to content
Merged
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
53 changes: 22 additions & 31 deletions Bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,8 @@ public function boot(Dispatcher $dispatcher): void

// Backend Hooks
if (!Shop::isFrontend()) {
$this->deactivateDeprecatedPaymentMethods();

/**
* !FIX ISSUES WITH getHelpDesc:
* - Description not being translated
Expand Down Expand Up @@ -242,21 +244,7 @@ public function installed()
$seeder->run();
}

// Deactivate Invoice Factoring Payment Method by setting nNutzbar to 0
foreach ($this->getPlugin()->getPaymentMethods()->getMethods() as $method) {
if (
($method->getActive() || $method->getUsable()) &&
in_array($method->getClassName(), self::getDeprecatedPaymentMethods())
) {
$this->getDB()->update(
'tzahlungsart',
'kZahlungsart',
$method->getMethodID(),
(object) ['nNutzbar' => 0, 'nActive' => 0]
);
}
}

$this->deactivateDeprecatedPaymentMethods();
$this->addApplePayVerification();

Shop::Container()->getCache()->flushTags([
Expand All @@ -273,22 +261,7 @@ public function installed()
*/
public function updated($oldVersion, $newVersion)
{
// Deactivate Invoice Factoring Payment Method by setting nNutzbar to 0
foreach ($this->getPlugin()->getPaymentMethods()->getMethods() as $method) {
if (
($method->getActive() || $method->getUsable()) &&
in_array($method->getClassName(), self::getDeprecatedPaymentMethods())
) {
$this->getDB()->update(
'tzahlungsart',
'kZahlungsart',
$method->getMethodID(),
(object) ['nNutzbar' => 0, 'nActive' => 0]
);
$this->getDB()->delete('tversandartzahlungsart', 'kZahlungsart', $method->getMethodID());
}
}

$this->deactivateDeprecatedPaymentMethods();
$this->addApplePayVerification();

Shop::Container()->getCache()->flushTags([
Expand Down Expand Up @@ -404,6 +377,24 @@ private function addApplePayVerification()
}
}

private function deactivateDeprecatedPaymentMethods(): void
{
foreach ($this->getPlugin()->getPaymentMethods()->getMethods() as $method) {
if (
($method->getActive() || $method->getUsable()) &&
in_array($method->getClassName(), self::getDeprecatedPaymentMethods(), true)
) {
$this->getDB()->update(
'tzahlungsart',
'kZahlungsart',
$method->getMethodID(),
(object) ['nNutzbar' => 0, 'nActive' => 0]
);

$this->getDB()->delete('tversandartzahlungsart', 'kZahlungsart', $method->getMethodID());
}
}
}

private function registerSmartyPhpFunctions(JTLSmarty $smarty): void
{
Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,23 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [2.0.4] (June 2026)
### Added
- support for **JTL 5.7** and **PHP 8.5**
- added support for 2FA redirects for *Invoice*, *Installments*, and *Direct Debit*

### Changed
- updated plugin documentation requirements
- remove *Merchant ID for Insight Portal* from settings as it is not needed anymore

### Fixed
- updated order status logic for *Direct Bank Transfer* due to updated flow where payment status AND transaction status must be considered
- added missing error message after canceling card payments on 3DS redirect page
- added missing "language" to customer object for B2B customers for *Google Pay*
- handle error after canceling *Wero* payment
- issue with customer name being taken from the shipping address instead of the billing address
- issue with B2B customer object for non-UPL payment methods (missing *company* field in address, missing *companyInfo* field)

## [2.0.3] (April 2026)
### Changed
- basket metadata is now set for all payment methods
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Dieses Plugin integriert die folgenden Unzer-Zahlungsarten im JTL Shop:
## Installation / Update
### Systemvoraussetzungen
- JTL-Shop 5.0.0+ und dessen Vorraussetzungen
- PHP Version: 7.4 - 8.4
- PHP Version: 7.4 - 8.5
- Die folgenden PHP Erweiterungen
- ext-json
- ext-curl
Expand Down Expand Up @@ -80,7 +80,7 @@ This plugin integrates the following Unzer payment methods into the JTL Shop:
## Installation/update
### System requirements
- JTL-Shop 5.0.0+ and its requirements
- PHP version: 7.4 - 8.4
- PHP version: 7.4 - 8.5
- The following PHP extensions
- ext-json
- ext-curl
Expand Down
20 changes: 0 additions & 20 deletions adminmenu/template/partials/_order_detail.tpl
Original file line number Diff line number Diff line change
@@ -1,25 +1,5 @@
{strip}
<div class="hp-order-detail-wrapper">
{* <div class="row">
<div class="col-12 col-xs-12">
<div class="input-group">
<div class="btn-group input-group-btn">
{if $hpPortalUrl}
{if $hpPayment->getPaymentType()->getResourceName() === 'paylater-invoice'}
<a class="btn btn-primary" title="{__('hpOpenInPaylaterPortal')}" href="{$hpPortalUrl}" target="_blank">
{__('hpOpenInPaylaterPortal')}
</a>
{else}
<a class="btn btn-primary" title="{__('hpOpenInPortal')}" href="{$hpPortalUrl}" target="_blank">
{__('hpOpenInPortal')}
</a>
{/if}
{/if}
</div>
</div>
</div>
</div> *}

<div class="row">
<div class="col-12 col-md-6 col-xs-12">
<div class="card panel panel-default">
Expand Down
3 changes: 0 additions & 3 deletions adminmenu/template/partials/_order_item.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@
<div class="input-group">
<div class="btn-group input-group-btn">
<button type="button" class="btn btn-xs btn-default" title="Details ansehen" onclick="window.hpOrderManagement.getDetails('{$hpOrder->getId()}');"><i class="fa fas fa-pen fa-pencil" aria-hidden="true"></i></button>
{* {if $hpPortalUrl}
<a class="btn btn-xs btn-primary" title="Bestellung im hp-Portal anzeigen" href="{$hpPortalUrl}" target="_blank"><i class="fa fas fa-external-link" aria-hidden="true"></i></a>
{/if} *}
</div>
</div>
</td>
Expand Down
11 changes: 0 additions & 11 deletions adminmenu/template/settings.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,17 +40,6 @@
<small class="form-text help-block text-muted">{__('hpSettingsPublicKeyHelp')}</small>
</div>
</div>

{* hIP / Insight Merchant ID *}
<div class="hp-admin-option row mb-2">
<div class="hp-admin-option__title col-xs-3 col-3">
<label for="hpSettings-merchantId">{__('hpSettingsMerchantIdLabel')}</small></label>
</div>
<div class="hp-admin-option__input col-xs-9 col-9">
<input type="text" class="form-control" name="merchantId" id="hpSettings-merchantId" value="{if isset($hpSettings.config.merchantId)}{$hpSettings.config.merchantId}{/if}" />
<small class="form-text help-block text-muted">{__('hpSettingsMerchantIdHelp')}</small>
</div>
</div>
</div>
</div>

Expand Down
Loading
Loading