@@ -11,11 +11,11 @@ |
||
11 | 11 | use Fhp\Model\StatementOfAccount\Statement; |
12 | 12 | use Fhp\Model\StatementOfAccount\Transaction; |
13 | 13 | |
14 | -define('FHP_BANK_URL', ''); # HBCI / FinTS Url can be found here: https://www.hbci-zka.de/institute/institut_auswahl.htm (use the PIN/TAN URL) |
|
15 | -define('FHP_BANK_PORT', 443); # HBCI / FinTS Port can be found here: https://www.hbci-zka.de/institute/institut_auswahl.htm |
|
16 | -define('FHP_BANK_CODE', ''); # Your bank code / Bankleitzahl |
|
14 | +define('FHP_BANK_URL', ''); # HBCI / FinTS Url can be found here: https://www.hbci-zka.de/institute/institut_auswahl.htm (use the PIN/TAN URL) |
|
15 | +define('FHP_BANK_PORT', 443); # HBCI / FinTS Port can be found here: https://www.hbci-zka.de/institute/institut_auswahl.htm |
|
16 | +define('FHP_BANK_CODE', ''); # Your bank code / Bankleitzahl |
|
17 | 17 | define('FHP_ONLINE_BANKING_USERNAME', ''); # Your online banking username / alias |
18 | -define('FHP_ONLINE_BANKING_PIN', ''); # Your online banking PIN (NOT! the pin of your bank card!) |
|
18 | +define('FHP_ONLINE_BANKING_PIN', ''); # Your online banking PIN (NOT! the pin of your bank card!) |
|
19 | 19 | |
20 | 20 | $fints = new FinTs( |
21 | 21 | FHP_BANK_URL, |
@@ -10,11 +10,11 @@ |
||
10 | 10 | use Fhp\Model\StatementOfAccount\Statement; |
11 | 11 | use Fhp\Model\StatementOfAccount\Transaction; |
12 | 12 | |
13 | -define('FHP_BANK_URL', ''); # HBCI / FinTS Url can be found here: https://www.hbci-zka.de/institute/institut_auswahl.htm (use the PIN/TAN URL) |
|
14 | -define('FHP_BANK_PORT', 443); # HBCI / FinTS Port can be found here: https://www.hbci-zka.de/institute/institut_auswahl.htm |
|
15 | -define('FHP_BANK_CODE', ''); # Your bank code / Bankleitzahl |
|
16 | -define('FHP_ONLINE_BANKING_USERNAME', ''); # Your online banking username / alias |
|
17 | -define('FHP_ONLINE_BANKING_PIN', ''); # Your online banking PIN (NOT! the pin of your bank card!) |
|
13 | +define('FHP_BANK_URL', ''); # HBCI / FinTS Url can be found here: https://www.hbci-zka.de/institute/institut_auswahl.htm (use the PIN/TAN URL) |
|
14 | +define('FHP_BANK_PORT', 443); # HBCI / FinTS Port can be found here: https://www.hbci-zka.de/institute/institut_auswahl.htm |
|
15 | +define('FHP_BANK_CODE', ''); # Your bank code / Bankleitzahl |
|
16 | +define('FHP_ONLINE_BANKING_USERNAME', ''); # Your online banking username / alias |
|
17 | +define('FHP_ONLINE_BANKING_PIN', ''); # Your online banking PIN (NOT! the pin of your bank card!) |
|
18 | 18 | |
19 | 19 | $fints = new FinTs( |
20 | 20 | FHP_BANK_URL, |
@@ -10,7 +10,7 @@ |
||
10 | 10 | */ |
11 | 11 | class SecurityIdentificationDetails extends Deg |
12 | 12 | { |
13 | - const PARTY_MS = 1; // sender |
|
13 | + const PARTY_MS = 1; // sender |
|
14 | 14 | const CID_NONE = ''; |
15 | 15 | |
16 | 16 | /** |
@@ -55,29 +55,29 @@ |
||
55 | 55 | protected static function addFromArray(array $array, StatementOfAccount $statementOfAccount) |
56 | 56 | { |
57 | 57 | foreach ($array as $statement) { |
58 | - $statementModel = new Statement(); |
|
59 | - $statementModel->setDate(new \DateTime($statement['date'])); |
|
60 | - $statementModel->setStartBalance((float) $statement['start_balance']['amount']); |
|
61 | - $statementModel->setCreditDebit($statement['start_balance']['credit_debit']); |
|
62 | - $statementOfAccount->addStatement($statementModel); |
|
58 | + $statementModel = new Statement(); |
|
59 | + $statementModel->setDate(new \DateTime($statement['date'])); |
|
60 | + $statementModel->setStartBalance((float) $statement['start_balance']['amount']); |
|
61 | + $statementModel->setCreditDebit($statement['start_balance']['credit_debit']); |
|
62 | + $statementOfAccount->addStatement($statementModel); |
|
63 | 63 | |
64 | - foreach ($statement['transactions'] as $trx) { |
|
65 | - $transaction = new Transaction(); |
|
66 | - $transaction->setBookingDate(new \DateTime($trx['booking_date'])); |
|
67 | - $transaction->setValutaDate(new \DateTime($trx['valuta_date'])); |
|
68 | - $transaction->setCreditDebit($trx['credit_debit']); |
|
69 | - $transaction->setAmount($trx['amount']); |
|
70 | - $transaction->setTransactionCode($trx['transaction_code']); |
|
71 | - $transaction->setBookingText($trx['description']['booking_text']); |
|
72 | - $transaction->setDescription1($trx['description']['description_1']); |
|
73 | - $transaction->setDescription2($trx['description']['description_2']); |
|
74 | - $transaction->setStructuredDescription($trx['description']['description']); |
|
75 | - $transaction->setBankCode($trx['description']['bank_code']); |
|
76 | - $transaction->setAccountNumber($trx['description']['account_number']); |
|
77 | - $transaction->setName($trx['description']['name']); |
|
78 | - $statementModel->addTransaction($transaction); |
|
79 | - } |
|
80 | - } |
|
64 | + foreach ($statement['transactions'] as $trx) { |
|
65 | + $transaction = new Transaction(); |
|
66 | + $transaction->setBookingDate(new \DateTime($trx['booking_date'])); |
|
67 | + $transaction->setValutaDate(new \DateTime($trx['valuta_date'])); |
|
68 | + $transaction->setCreditDebit($trx['credit_debit']); |
|
69 | + $transaction->setAmount($trx['amount']); |
|
70 | + $transaction->setTransactionCode($trx['transaction_code']); |
|
71 | + $transaction->setBookingText($trx['description']['booking_text']); |
|
72 | + $transaction->setDescription1($trx['description']['description_1']); |
|
73 | + $transaction->setDescription2($trx['description']['description_2']); |
|
74 | + $transaction->setStructuredDescription($trx['description']['description']); |
|
75 | + $transaction->setBankCode($trx['description']['bank_code']); |
|
76 | + $transaction->setAccountNumber($trx['description']['account_number']); |
|
77 | + $transaction->setName($trx['description']['name']); |
|
78 | + $statementModel->addTransaction($transaction); |
|
79 | + } |
|
80 | + } |
|
81 | 81 | |
82 | 82 | return $statementOfAccount; |
83 | 83 | } |