Skip to content
Open
Show file tree
Hide file tree
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
8 changes: 4 additions & 4 deletions Trustly/Api/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ abstract class Trustly_Api {
*
* @var string FQHN
*/
protected $api_host = NULL;
protected $api_host;
/**
* API port used for communication.
*
* @var integer Normally either 443 (https) or 80 (http)
*/
protected $api_port = NULL;
protected $api_port;
/**
* Inidicator wether the API host is communicating using https
*
Expand All @@ -63,7 +63,7 @@ abstract class Trustly_Api {
*
* @see Trustly_Api::getLastRequest()
*
* @var array Last API call in data form.
* @var ?Trustly_Data_Request Last API call in data form.
*/
public $last_request = NULL;

Expand Down Expand Up @@ -404,7 +404,7 @@ public function url($request=NULL) {
/**
* Return the last request that we attempted to make via this API
*
* @return array Last request data structure.
* @return ?Trustly_Data_Request Last request data structure.
*/
public function getLastRequest() {
return $this->last_request;
Expand Down
4 changes: 2 additions & 2 deletions Trustly/Api/signed.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
class Trustly_Api_Signed extends Trustly_Api {
/**
* Loaded merchant private key resource
* @var resource from openssl with the loaded privatekey
* @var mixed from openssl with the loaded privatekey
*/
private $merchant_privatekey = NULL;

Expand Down Expand Up @@ -70,7 +70,7 @@ public function __construct($merchant_privatekey, $username, $password, $host='t
parent::__construct($host, $port, $is_https);

$this->api_username = $username;
$this->api_password = $password;
$this->api_password = $password;
if($merchant_privatekey != NULL) {
if(strpos($merchant_privatekey, "\n") !== FALSE) {
if($this->useMerchantPrivateKey($merchant_privatekey) === FALSE) {
Expand Down
6 changes: 3 additions & 3 deletions Trustly/Api/unsigned.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,16 @@ class Trustly_Api_Unsigned extends Trustly_Api {
* newSessionCookie after which the $session_uuid is used instead.
* @var string
*/
private $api_username = NULL;
private $api_username;
/**
* Login password when using the API. Used only in the first API call to
* newSessionCookie after which the $session_uuid is used instead.
* @var string
*/
private $api_password = NULL;
private $api_password;
/**
* Session UUID used for authenticating calls.
* @var string
* @var ?string
*/
private $session_uuid = NULL;

Expand Down
10 changes: 1 addition & 9 deletions Trustly/Data/data.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,7 @@ class Trustly_Data {
* Data payload
* @var array
*/
protected $payload = NULL;

/**
* Constructur.
*/
public function __construct() {
$this->payload = array();
}

protected $payload = array();

/**
* Utility function to vacuum the supplied data end remove unset
Expand Down
4 changes: 1 addition & 3 deletions Trustly/Data/jsonrpcnotificationrequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class Trustly_Data_JSONRPCNotificationRequest extends Trustly_Data {
* The RAW incoming notification body
* @var string
*/
var $notification_body = NULL;
public $notification_body;


/**
Expand All @@ -55,8 +55,6 @@ class Trustly_Data_JSONRPCNotificationRequest extends Trustly_Data {
* @param string $notification RAW incoming notification body
*/
public function __construct($notification_body) {
parent::__construct();

$this->notification_body = $notification_body;

if(empty($notification_body)) {
Expand Down
3 changes: 0 additions & 3 deletions Trustly/Data/jsonrpcnotificationresponse.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ class Trustly_Data_JSONRPCNotificationResponse extends Trustly_Data {
* was successfully processed.
*/
public function __construct($request, $success=NULL) {

parent::__construct();

$uuid = $request->getUUID();
$method = $request->getMethod();

Expand Down
4 changes: 1 addition & 3 deletions Trustly/Data/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Trustly_Data_Request extends Trustly_Data {
* Call method name
* @var string
*/
var $method = NULL;
public $method = NULL;

/**
* Constructor.
Expand All @@ -48,8 +48,6 @@ class Trustly_Data_Request extends Trustly_Data {
* @param array $payload Call payload
*/
public function __construct($method=NULL, $payload=NULL) {
parent::__construct();

$vpayload = $this->vacuum($payload);
if(isset($vpayload)) {
$this->payload = $vpayload;
Expand Down
12 changes: 5 additions & 7 deletions Trustly/Data/response.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,21 @@ class Trustly_Data_Response extends Trustly_Data {

/**
* Raw copy of the incoming response body
* @var integer
* @var ?string
*/
var $response_body = NULL;
public $response_body = NULL;

/**
* The response HTTP code
* @var integer
* @var ?integer
*/
var $response_code = NULL;
public $response_code = NULL;

/**
* Shortcut to the part of the result being actually interesting. The guts will contain all returned data.
* @var mixed
*/
var $response_result = NULL;
public $response_result = NULL;


/**
Expand All @@ -67,8 +67,6 @@ class Trustly_Data_Response extends Trustly_Data {
* @param integer $response_code HTTP response code from the API call
*/
public function __construct($response_body, $response_code=NULL) {
parent::__construct();

$this->response_code = $response_code;
$this->response_body = $response_body;

Expand Down