Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/Message/ChargeResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,27 +38,27 @@ public function getRedirectData()

public function getTransactionId()
{
return $this->data['transactionId'];
return $this->data['transactionId'] ?? null;
}

public function getTenders()
{
return $this->data['tenders'];
return $this->data['tenders'] ?? null;
}

public function getOrderId()
{
return $this->data['orderId'];
return $this->data['orderId'] ?? null;
}

public function getCreatedAt()
{
return $this->data['created_at'];
return $this->data['created_at'] ?? null;
}

public function getReferenceId()
{
return $this->data['referenceId'];
return $this->data['referenceId'] ?? null;
}

public function getMessage()
Expand All @@ -68,7 +68,7 @@ public function getMessage()
$message .= $this->data['code'] . ': ';
}

return $message . ($this->data['error'] ?? '');
return $message . ($this->data['detail'] ?? '');
}

/**
Expand All @@ -84,10 +84,10 @@ public function getTransactionReference()
/**
* Get the tender id that is used for processing refunds
*
* @return string
* @return null|string
*/
public function getBillingId()
{
return $this->getTenders()[0]['id'];
return $this->getTenders()[0]['id'] ?? null;
}
}