feat: include bank account in booking data

This commit is contained in:
Björn Fromme
2025-03-27 11:41:30 +01:00
parent 3d9177f979
commit e4cea1e47d
4 changed files with 32 additions and 0 deletions
+11
View File
@@ -3,6 +3,7 @@
namespace App\BusProNet\XmlParser;
use App\BusProNet\Model\Address;
use App\BusProNet\Model\BankAccount;
use App\BusProNet\Model\Booking;
use App\BusProNet\Model\Communication;
use App\BusProNet\Model\PersonalData;
@@ -57,6 +58,16 @@ class BookingParser extends AbstractParser
$booking->paymentLabel = $paymentData->attr('bezeichnung');
$booking->paymentType = $paymentData->attr('art');
if (0 < $paymentData->children()->count()) {
$bankDataNode = $paymentData->children()->first();
$bankAccount = new BankAccount();
$bankAccount->iban = $bankDataNode->attr('iban');
$bankAccount->bic = $bankDataNode->attr('bic');
$bankAccount->bankName = $bankDataNode->attr('kreditinstitut');
$bankAccount->holder = $bankDataNode->attr('kontoinhaber');
$booking->bankAccount = $bankAccount;
}
$transportationData = $node->filterXPath('//beförderungen/beförderung');
if (0 < $transportationData->count()) {
$booking->transportationServices = $this