Skip to content

Commit

Permalink
Merge pull request #26 from incube8/master
Browse files Browse the repository at this point in the history
Adding response log information
  • Loading branch information
ivan-kovalyov committed Aug 4, 2015
2 parents 84934a2 + 9be540d commit 6065caa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions lib/Paymentwall/ApiObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ abstract class Paymentwall_ApiObject extends Paymentwall_Instance
protected $properties = array();
protected $_id;
protected $_rawResponse = '';
protected $_responseLogInformation = array();
protected $brickSubEndpoints = array(
self::API_OBJECT_CHARGE, self::API_OBJECT_SUBSCRIPTION, self::API_OBJECT_ONE_TIME_TOKEN
);
Expand Down Expand Up @@ -99,9 +100,18 @@ protected function doApiAction($action = '', $method = 'post')
$httpAction = new Paymentwall_HttpAction($this, array('id' => $this->_id), array(
$this->getApiBaseHeader()
));
$this->_responseLogInformation = $httpAction->getResponseLogInformation();
$this->setPropertiesFromResponse(
$method == 'get' ? $httpAction->get($actionUrl) : $httpAction->post($actionUrl)
);

return $this;
}

protected function getResponseLogInformation()
{
return $this->_responseLogInformation;
}


}

0 comments on commit 6065caa

Please sign in to comment.