Skip to content
Snippets Groups Projects
Commit 27012b9d authored by lukasmatusiewicz's avatar lukasmatusiewicz
Browse files

Add message to PIResponse

parent ebd21246
Branches
Tags
No related merge requests found
......@@ -6,6 +6,8 @@ class PIResponse
{
/* @var string All tokens messages which are sent by PI and can be used in UI to help user interact with service. */
public $messages = "";
/* @var string PI message. */
public $message = "";
/* @var string Transaction ID which is needed by some PI API requests. */
public $transactionID = "";
/* @var string This is the raw PI response in JSON format. */
......@@ -66,6 +68,10 @@ class PIResponse
{
$ret->messages = implode(", ", array_unique($map['detail']['messages'])) ?: "";
}
if (isset($map['detail']['message']))
{
$ret->message = $map['detail']['message'];
}
if (isset($map['detail']['transaction_id']))
{
$ret->transactionID = $map['detail']['transaction_id'];
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment