dolibarr.bankimport/vendor/nemiah/php-fints/lib/Fhp/Protocol/GetTanMedia.php
data 014a943f78 feat: HKEKA-Implementierung, PDF-Bugfixes, Sortierung, Umsatz-Umbenennung
- HKEKA v3/v4/v5 Segmente fuer phpFinTS implementiert (VR Bank unterstuetzt kein HKEKP)
- GetElectronicStatement Action mit Base64-Erkennung und Quittungscode
- PDF-Deduplizierung per MD5 (Bank sendet identische Saldenmitteilungen)
- Saldenmitteilungen ohne Auszugsnummer werden uebersprungen
- Datums-Validierung: 30.02. (Bank-Konvention) wird auf 28.02. korrigiert
- Numerische Sortierung fuer statement_number (CAST statt String-Sort)
- Jahr-Filter: statement_year=0 ausgeschlossen
- Menue/Button: "Kontoauszuege" -> "Umsaetze" (statements.php zeigt MT940, nicht PDFs)
- Redirect nach FinTS-Abruf auf aktuelles Jahr statt year=0

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-06 07:10:59 +01:00

52 lines
1.4 KiB
PHP
Executable file

<?php
namespace Fhp\Protocol;
use Fhp\BaseAction;
use Fhp\Segment\TAB\HITAB;
use Fhp\Segment\TAB\HKTABv4;
use Fhp\Segment\TAB\HKTABv5;
use Fhp\Segment\TAB\TanMediumListe;
use Fhp\UnsupportedException;
/**
* Fetches the TAN media (e.g. different mobile phones or iTAN lists) that are available to the user (HTKAB).
*/
class GetTanMedia extends BaseAction
{
/** @var TanMediumListe[]|null */
private $tanMedia;
/** {@inheritdoc} */
protected function createRequest(BPD $bpd, ?UPD $upd)
{
// Prepare the HKTAB request.
$hitabs = $bpd->requireLatestSupportedParameters('HITABS');
switch ($hitabs->getVersion()) {
case 4:
return HKTABv4::createEmpty();
case 5:
return HKTABv5::createEmpty();
default:
throw new UnsupportedException('Unsupported HKTAB version: ' . $hitabs->getVersion());
}
}
/** {@inheritdoc} */
public function processResponse(Message $response)
{
parent::processResponse($response);
/** @var HITAB $hitab */
$hitab = $response->requireSegment(HITAB::class);
$this->tanMedia = $hitab->getTanMediumListe() === null ? [] : $hitab->getTanMediumListe();
}
/**
* @return TanMediumListe[]|null
*/
public function getTanMedia(): ?array
{
$this->ensureDone();
return $this->tanMedia;
}
}