dolibarr.bankimport/vendor/nemiah/php-fints/lib/Fhp/Protocol/GetTanMedia.php
data 8b64fd24d3 feat: php-fints 4.0 Update + HKEKA/HKKAA Segmente (WIP)
- php-fints Bibliothek von 3.7.0 auf 4.0.0 aktualisiert
- Parser-Fix: Ignoriert zusätzliche Bank-Felder statt Exception
- HKEKA Segmente implementiert (HIEKASv5, HKEKAv5, HIEKAv5)
- HKKAA Segmente implementiert (HIKAASv1, HKKAAv1)
- GetStatementFromArchive und GetElectronicStatement Actions

HINWEIS: HKKAA/HKEKA funktionieren noch nicht mit VR Bank
(Fehler "unerwarteter Aufbau wrt DE 2" - Kontoverbindungsformat)
Normale Funktionalität (Transaktionsimport) ist nicht betroffen.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-05 15:47:27 +01:00

50 lines
1.3 KiB
PHP

<?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;
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());
}
}
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;
}
}