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
32 changes: 18 additions & 14 deletions Trustly/Api/signed.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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) {

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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) {

Expand All @@ -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) {

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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) {

Expand All @@ -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) {

Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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) {

Expand Down
6 changes: 2 additions & 4 deletions Trustly/Api/unsigned.php
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down