Skip to content

Commit

Permalink
Merge pull request #6 from shellrent/transfer_fix_debtoriban
Browse files Browse the repository at this point in the history
Fix debtor IBAN null in response
  • Loading branch information
svdigital-development authored Jul 4, 2022
2 parents 8d2fd5f + 1efb774 commit 171c1a4
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/Models/GenericPaymentData.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,21 @@ protected function hydrateData( stdClass $data ) {
$this->PaymentId = $data->{'payment-id'};
}

$this->setDebtorName( $data->debtorName );
$this->setDebtorIban( $data->debtorIBAN );
$this->setCreditorName( $data->creditorName );
$this->setCreditorIban( $data->creditorIBAN );
if( isset( $data->debtorName ) and !empty( $data->debtorName ) ) {
$this->setDebtorName( $data->debtorName );
}

if( isset( $data->debtorIBAN ) and !empty( $data->debtorIBAN ) ) {
$this->setDebtorIban( $data->debtorIBAN );
}

if( isset( $data->creditorName ) and !empty( $data->creditorName ) ) {
$this->setCreditorName( $data->creditorName );
}

if( isset( $data->creditorIBAN ) and !empty( $data->creditorIBAN ) ) {
$this->setCreditorIban( $data->creditorIBAN );
}

if( isset( $data->paymentInformation ) and !empty( $data->paymentInformation ) ) {
$this->setPaymentInformation( $data->paymentInformation );
Expand Down

0 comments on commit 171c1a4

Please sign in to comment.