Skip to content

Commit

Permalink
Adding response log information
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyincube8 committed Aug 4, 2015
1 parent 6bf7d17 commit 9be540d
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 9be540d

Please sign in to comment.