diff --git a/Trustly/Api/signed.php b/Trustly/Api/signed.php index 69d0b5b..cbe2abf 100644 --- a/Trustly/Api/signed.php +++ b/Trustly/Api/signed.php @@ -303,7 +303,7 @@ protected function generateUUID() { * * @param Trustly_Data_JSONRPCRequest $request Outgoing request * - * @return Trustly_Data_JSONRPCSignedResponse Response from the API. + * @return Trustly_Data_JSONRPCResponse Response from the API. */ public function call($request) { $uuid = $request->getUUID(); @@ -437,7 +437,7 @@ public function call($request) { * in the previously used account being preselected * @param bool $requestKYC Flag to pass whether we request KYC check or not (Pay N Play feature) * - * @return Trustly_Data_JSONRPCSignedResponse + * @return Trustly_Data_JSONRPCResponse */ public function deposit($notificationurl, $enduserid, $messageid, $locale=NULL, $amount=NULL, $currency=NULL, $country=NULL, @@ -518,7 +518,7 @@ public function deposit($notificationurl, $enduserid, $messageid, * @param string currency The currency of the amount to refund the * customer. * - * @return Trustly_Data_JSONRPCSignedResponse + * @return Trustly_Data_JSONRPCResponse */ public function refund($orderid, $amount, $currency) { @@ -617,7 +617,7 @@ public function refund($orderid, $amount, $currency) { * * @param string $address The account holders address * - * @return Trustly_Data_JSONRPCSignedResponse + * @return Trustly_Data_JSONRPCResponse */ public function withdraw($notificationurl, $enduserid, $messageid, $locale=NULL, $currency=NULL, $country=NULL, @@ -676,7 +676,7 @@ public function withdraw($notificationurl, $enduserid, $messageid, * * @param integer $orderid The OrderID of the withdrawal to approve. * - * @return Trustly_Data_JSONRPCSignedResponse + * @return Trustly_Data_JSONRPCResponse */ public function approveWithdrawal($orderid) { @@ -699,7 +699,7 @@ public function approveWithdrawal($orderid) { * * @param integer $orderid The OrderID of the withdrawal to deny. * - * @return Trustly_Data_JSONRPCSignedResponse + * @return Trustly_Data_JSONRPCResponse */ public function denyWithdrawal($orderid) { @@ -767,7 +767,7 @@ public function denyWithdrawal($orderid) { * @param boolean $requestdirectdebitmandate Initiate a direct debit * mandate request for the selected account. * - * @return Trustly_Data_JSONRPCSignedResponse + * @return Trustly_Data_JSONRPCResponse */ public function selectAccount($notificationurl, $enduserid, $messageid, $locale=NULL, $country=NULL, $ip=NULL, $successurl=NULL, $urltarget=NULL, @@ -860,7 +860,7 @@ public function selectAccount($notificationurl, $enduserid, $messageid, * * @param string $address The account holders address * - * @return Trustly_Data_JSONRPCSignedResponse + * @return Trustly_Data_JSONRPCResponse */ public function registerAccount($enduserid, $clearinghouse, $banknumber, $accountnumber, $firstname, $lastname, $mobilephone=NULL, @@ -935,7 +935,7 @@ public function registerAccount($enduserid, $clearinghouse, $banknumber, * system during development. Intead you can get you notifications on * https://test.trustly.com/notifications.html * - * @return Trustly_Data_JSONRPCSignedResponse + * @return Trustly_Data_JSONRPCResponse */ public function accountPayout($notificationurl, $accountid, $enduserid, $messageid, $amount, $currency, $holdnotifications=NULL) { @@ -1049,7 +1049,11 @@ public function accountPayout($notificationurl, $accountid, $enduserid, * system during development. Intead you can get you notifications on * https://test.trustly.com/notifications.html * - * @return Trustly_Data_JSONRPCSignedResponse + * @param mixed $authorizeonly + * + * @param mixed $templatedata + * + * @return Trustly_Data_JSONRPCResponse */ public function p2p($notificationurl,$enduserid, $messageid, $locale=NULL, $amount=NULL, $currency=NULL, $country=NULL, @@ -1115,7 +1119,7 @@ public function p2p($notificationurl,$enduserid, $messageid, * * @param integer $currency The currency of the amount * - * @return Trustly_Data_JSONRPCSignedResponse + * @return Trustly_Data_JSONRPCResponse */ public function capture($orderid, $amount, $currency) { @@ -1142,7 +1146,7 @@ public function capture($orderid, $amount, $currency) { * * @param integer $orderid The OrderID of the deposit to void * - * @return Trustly_Data_JSONRPCSignedResponse + * @return Trustly_Data_JSONRPCResponse */ public function void($orderid) { @@ -1189,7 +1193,7 @@ public function void($orderid) { * @param string $shopperstatement The text to show on the end-user's bank * statement. * - * @return Trustly_Data_JSONRPCSignedResponse + * @return Trustly_Data_JSONRPCResponse */ public function charge($accountid, $notificationurl, $enduserid, $messageid, $amount, $currency, $shopperstatement=NULL) { @@ -1220,7 +1224,7 @@ public function charge($accountid, $notificationurl, $enduserid, $messageid, * * @param integer $orderid The OrderID of the order to query * - * @return Trustly_Data_JSONRPCSignedResponse + * @return Trustly_Data_JSONRPCResponse */ public function getWithdrawals($orderid) { diff --git a/Trustly/Api/unsigned.php b/Trustly/Api/unsigned.php index c62d6b9..23eb157 100644 --- a/Trustly/Api/unsigned.php +++ b/Trustly/Api/unsigned.php @@ -163,10 +163,8 @@ public function newSessionCookie() { * missing session uuid here and call this function if it is not set */ $response = parent::call($request); - if(isset($response)) { - if($response->isSuccess()) { - $this->session_uuid = $response->getResult('sessionuuid'); - } + if($response->isSuccess()) { + $this->session_uuid = $response->getResult('sessionuuid'); } if(!isset($this->session_uuid)) { throw new Trustly_AuthentificationException();