dolibarr.bankimport/vendor/nemiah/php-fints/lib/Fhp/Options/Credentials.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

58 lines
1.8 KiB
PHP

<?php
namespace Fhp\Options;
/**
* Login information for a user.
*/
class Credentials
{
/** @var string */
protected $benutzerkennung;
/** @var string */
protected $pin;
private function __construct()
{
}
/**
* Creates credentials for a German bank.
* @param string $benutzerkennung This is the username used for login. Usually it's the same also used for web-based
* online banking. Most banks initially assign a number as a username. Some banks allow users to customize the
* username later on. Note that most banks equate user (Benutzer) and customer (Kunde), but some banks may
* distinguish this username (Benutzerkennung) from the customer ID (Kunden-ID) e.g. in HIUPD.
* @param string $pin This is the PIN used for login. With most banks, the PIN does not have to be numerical but
* could contain alphabetical or even arbitrary characters.
* @return Credentials A new Credentials instance.
*/
public static function create(string $benutzerkennung, string $pin): Credentials
{
if (strlen($benutzerkennung) === 0) {
throw new \InvalidArgumentException('benutzerkennung cannot be empty');
}
if (strlen($pin) === 0) {
throw new \InvalidArgumentException('pin cannot be empty');
}
$result = new Credentials();
$result->benutzerkennung = $benutzerkennung;
$result->pin = $pin;
return $result;
}
public function getBenutzerkennung(): string
{
return $this->benutzerkennung;
}
public function getPin(): string
{
return $this->pin;
}
public function __debugInfo()
{
return null; // Prevent sensitive data from leaking into logs through var_dump() or print_r().
}
}