Skip to content

Commit

Permalink
For some error response payId can be null
Browse files Browse the repository at this point in the history
  • Loading branch information
Daaarkling authored and janlanger committed Sep 21, 2022
1 parent d8b30a0 commit 41702a3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Call/PaymentResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(
public static function createFromResponseData(array $data): self
{
return new self(
$data['payId'],
$data['payId'] ?? '', // for some error response it can be null
DateTimeImmutable::createFromFormat('YmdHis', $data['dttm']),
ResultCode::from($data['resultCode']),
$data['resultMessage'],
Expand Down

0 comments on commit 41702a3

Please sign in to comment.