Skip to content

Commit a4a9ca3

Browse files
authored
Merge branch 'master' into patch-4
2 parents b7736ef + a582775 commit a4a9ca3

70 files changed

Lines changed: 200 additions & 214 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitattributes

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/.* export-ignore
2+
/Tests export-ignore
3+
/DEVELOPER-GUIDE.md export-ignore
4+
/phplint.sh export-ignore
5+
/phpunit.xml.dist export-ignore

README.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Forked from [mschindler83/fints-hbci-php](https://github.com/mschindler83/fints-
1818
## Getting Started
1919

2020
Before using this library (or any other FinTS library), you have to register your application with
21-
[Die Deutsche Kreditwirtschaft](https://www.hbci-zka.de/register/hersteller.htm) in order to get your registration
21+
[Die Deutsche Kreditwirtschaft](https://www.fints.org/de/hersteller/produktregistrierung) in order to get your registration
2222
number.
2323
Note that this process can take several weeks.
2424
First you receive your registration number **after a couple days, but then you have to wait anywhere between 0 and 8+ weeks**
@@ -30,15 +30,16 @@ from your platform." just install php-mbstring in advance.
3030
- to avoid error messages like "As there is no 'unzip' nor '7z' command installed zip files are being unpacked using the PHP
3131
zip extension." just install unzip or 7z in advance to coninuing to next step.
3232

33-
Then install the library via composer:
33+
34+
Then install the library via [composer](https://getcomposer.org/download/):
3435

3536
```
3637
composer require nemiah/php-fints
3738
```
3839

3940
See the examples in the "[Samples](/Samples)" folder to get started on your code.
4041
Fill out the required configuration in `init.php` (server details can be obtained at
41-
[www.hbci-zka.de](https://www.hbci-zka.de) after registration).
42+
[https://www.fints.org](https://www.fints.org/de/startseite) after registration).
4243
Then execute `tanModesAndMedia.php` and later `login.php`.
4344
Once you are able to login without any issues, you can move on to the other examples.
4445

@@ -50,16 +51,18 @@ If you are developing an online banking application with this library, please be
5051

5152
The BLZ 71120078 will throw an "Unbekanntes Kreditinstitut" exception when used with the URL https://hbci-01.hypovereinsbank.de/bank/hbci.
5253
You have to use BLZ 70020270 instead.
53-
```
54+
55+
```php
5456
if (trim($url) == 'https://hbci-01.hypovereinsbank.de/bank/hbci')
5557
$blz = '70020270';
5658
```
5759

5860
### ING Diba
5961

6062
This bank does not support PSD2:
61-
```
62-
if(trim($blz) == "50010517")
63+
64+
```php
65+
if (trim($blz) == "50010517")
6366
$fints->selectTanMode(new Fhp\Model\NoPsd2TanMode());
6467
```
6568

@@ -69,11 +72,14 @@ Contributions are welcome! See the [developer guide](DEVELOPER-GUIDE.md) for som
6972

7073
We use a slightly modified version of the [Symfony Coding-Style](https://symfony.com/doc/current/contributing/code/standards.html).
7174
Please run
72-
```
75+
76+
```bash
7377
composer update
7478
```
79+
7580
and
76-
```
81+
82+
```bash
7783
composer cs-fix
7884
```
7985

@@ -86,7 +92,7 @@ specification differently sometimes. In addition, banks behave differently (with
8692
when it comes to validation (some may tolerate slightly wrong requests), TANs (some ask for TANs more often than others)
8793
and allowed parameters (not all banks support all parameter combinations).
8894

89-
This library aims to be compatible with all banks that support [FinTS V3.0](https://www.hbci-zka.de/spec/3_0.htm) and
95+
This library aims to be compatible with all banks that support [FinTS V3.0](https://www.fints.org/de/spezifikation) and
9096
PIN/TAN-based authentication according to PSD2 regulations, which includes most relevant German banks. Currently, it
9197
works with the most popular banks at least, and probably with most others too. Some corner cases (e.g. Mehrfach-TANs or
9298
SMS-Abbuchungskonto for mTAN fees) are not and probably will not be supported.
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<?php
22

3-
namespace Tests\Fhp;
3+
namespace Fhp\Tests;
4+
5+
use Psr\Log\AbstractLogger;
46

57
/**
68
* A logger that prints log messages to the console (just PHP `echo`). This class is designed to be used only for
79
* testing purposes.
810
*/
9-
class CLILogger extends \Psr\Log\AbstractLogger
11+
class CLILogger extends AbstractLogger
1012
{
1113
public function log($level, $message, array $context = []): void
1214
{
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Tests\Fhp;
3+
namespace Fhp\Tests;
44

55
use Fhp\Connection;
66
use Fhp\FinTs;

lib/Tests/Fhp/Action/SendSEPATransferTest.php renamed to Tests/Unit/Action/SendSEPATransferTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace Tests\Fhp\Action;
3+
namespace Fhp\Tests\Unit\Action;
44

55
use Fhp\Protocol\Message;
66
use Fhp\Syntax\Serializer;
7-
use Tests\Fhp\Integration\DKB\SendSEPATransferTest as DKBSendSEPATransferTest;
7+
use Fhp\Tests\Unit\Integration\DKB\SendSEPATransferTest as DKBSendSEPATransferTest;
88

99
class SendSEPATransferTest extends DKBSendSEPATransferTest
1010
{

lib/Tests/Fhp/BaseActionTanSerializationTest.php renamed to Tests/Unit/BaseActionTanSerializationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
namespace Fhp;
3+
namespace Fhp\Tests\Unit;
44

5-
use Tests\Fhp\Integration\DKB\SendSEPATransferTest as DKBSendSEPATransferTest;
5+
use Fhp\Tests\Unit\Integration\DKB\SendSEPATransferTest as DKBSendSEPATransferTest;
66

77
class BaseActionTanSerializationTest extends DKBSendSEPATransferTest
88
{

lib/Tests/Fhp/BaseActionVopSerializationTest.php renamed to Tests/Unit/BaseActionVopSerializationTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php
22

3-
namespace Fhp;
3+
namespace Fhp\Tests\Unit;
44

5-
use Tests\Fhp\Integration\Atruvia\SendTransferVoPTest;
5+
use Fhp\Tests\Unit\Integration\Atruvia\SendTransferVoPTest;
66

77
class BaseActionVopSerializationTest extends SendTransferVoPTest
88
{
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
<?php
22
/** @noinspection PhpUndefinedClassInspection */
33

4-
namespace Tests\Fhp;
4+
namespace Fhp\Tests\Unit;
55

66
use Fhp\Connection;
77
use Fhp\Options\Credentials;
88
use Fhp\Options\FinTsOptions;
99
use Fhp\Segment\HNHBK\HNHBKv3;
10+
use Fhp\Tests\FinTsPeer;
1011
use PHPUnit\Framework\MockObject\MockObject;
1112
use PHPUnit\Framework\TestCase;
1213

@@ -73,7 +74,7 @@ protected function setUpConnection()
7374

7475
// Grab the next expected request and its mock response.
7576
$this->assertNotEmpty($this->expectedMessages, "Expected no more requests, but got: $request");
76-
list($expectedRequest, $mockResponse) = array_shift($this->expectedMessages);
77+
[$expectedRequest, $mockResponse] = array_shift($this->expectedMessages);
7778

7879
// Check that the request matches the expectation.
7980
if (strlen($expectedRequest) > 0 && !str_starts_with($expectedRequest, 'HNHBK')) {

lib/Tests/Fhp/Integration/Atruvia/AtruviaIntegrationTestBase.php renamed to Tests/Unit/Integration/Atruvia/AtruviaIntegrationTestBase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?php
22

3-
namespace Tests\Fhp\Integration\Atruvia;
3+
namespace Fhp\Tests\Unit\Integration\Atruvia;
44

55
use Fhp\Model\SEPAAccount;
6-
use Tests\Fhp\FinTsTestCase;
6+
use Fhp\Tests\Unit\FinTsTestCase;
77

88
class AtruviaIntegrationTestBase extends FinTsTestCase
99
{

lib/Tests/Fhp/Integration/Atruvia/SendTransferVoPTest.php renamed to Tests/Unit/Integration/Atruvia/SendTransferVoPTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace Tests\Fhp\Integration\Atruvia;
3+
namespace Fhp\Tests\Unit\Integration\Atruvia;
44

55
use Fhp\Action\SendSEPATransfer;
66
use Fhp\Model\VopVerificationResult;

0 commit comments

Comments
 (0)