Skip to content

Commit

Permalink
Merge pull request #48 from netbull/master
Browse files Browse the repository at this point in the history
added createdAt property for issue #43
  • Loading branch information
tobiaslins authored Feb 8, 2017
2 parents 9b9a864 + ff2fc1f commit f30c38b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/Responses/AbstractResponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,11 @@ abstract class AbstractResponse
*/
protected $returnCode;

/**
* @var \DateTime
*/
protected $createdAt;

/**
* Sets the basic values from the response from mPAY24: status and return code
*
Expand Down Expand Up @@ -87,6 +92,8 @@ public function __construct($response)
$this->status = "ERROR";
$this->returnCode = "The response is empty! Probably your request to mPAY24 was not sent! Please see your server log for more information!";
}

$this->createdAt = new \DateTime('now');
}

/**
Expand Down Expand Up @@ -157,4 +164,12 @@ protected function setReturnCode($returnCode)
{
return $this->returnCode = $returnCode;
}
}

/**
* @return \DateTime
*/
public function getCreatedAt()
{
return $this->createdAt;
}
}

0 comments on commit f30c38b

Please sign in to comment.