diff --git a/Trustly/Api/signed.php b/Trustly/Api/signed.php index 69d0b5b..1a64ab0 100644 --- a/Trustly/Api/signed.php +++ b/Trustly/Api/signed.php @@ -124,7 +124,9 @@ public function useMerchantPrivateKey($cert) { * @throws Trustly_SignatureException if private key has not been loaded * yet or if we for some other reason fail to sign the request. * - * @param Trustly_Data_JSONRPCRequest $request Request to sign. + * @param Trustly_Data_JSONRPCRequest|Trustly_Data_JSONRPCNotificationResponse $request Request to sign. + * + * @return string */ public function signMerchantRequest($request) { if(!isset($this->merchant_privatekey)) { @@ -166,9 +168,6 @@ protected function insertCredentials($request) { $request->setData('Password', $this->api_password); $signature = $this->signMerchantRequest($request); - if($signature === FALSE) { - return FALSE; - } $request->setParam('Signature', $signature); return TRUE; @@ -223,9 +222,6 @@ public function notificationResponse($request, $success=TRUE) { $response = new Trustly_Data_JSONRPCNotificationResponse($request, $success); $signature = $this->signMerchantRequest($response); - if($signature === FALSE) { - return FALSE; - } $response->setSignature($signature); return $response;