feat: include bank account in booking data
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user