Trustly/Api/signed.php
protected function handleResponse($request, $body, $response_code) {
		$response = new Trustly_Data_JSONRPCSignedResponse($body, $response_code);

		if($this->verifyTrustlySignedResponse($response) !== TRUE) {
			throw new Trustly_SignatureException('Incomming message signature is not valid', $response);
		}

		if($response->getUUID() !== $request->getUUID()) {
			throw new Trustly_DataException('Incoming message is not related to request. UUID mismatch');
		}

		return $response;
	}
protected function handleResponse($request, $body, $response_code) {
		$response = new Trustly_Data_JSONRPCSignedResponse($body, $response_code);

		if($this->verifyTrustlySignedResponse($response) !== TRUE) {
			throw new Trustly_SignatureException('Incomming message signature is not valid', $response);
		}

		if($response->getUUID() !== $request->getUUID()) {
			throw new Trustly_DataException('Incoming message is not related to request. UUID mismatch');
		}

		return $response;
	}
protected function handleResponse ( $ request , $ body , $ response_code ) { $ response = new Trustly_Data_JSONRPCSignedResponse ( $ body , $ response_code ) ; if ( $ this -> verifyTrustlySignedResponse ( $ response ) !== TRUE ) { throw new Trustly_SignatureException ( 'Incomming message signature is not valid' , $ response ) ; } if ( $ response -> getUUID ( ) !== $ request -> getUUID ( ) ) { throw new Trustly_DataException ( 'Incoming message is not related to request. UUID mismatch' ) ; } return $ response ; }
Callback for handling the response from an API call. Takes
the input data and create an instance of a response object.

@throws Trustly_SignatureException If the incoming message has an
invalid signature

@throws Trustly_DataException If the incoming message fails the sanity
checks.

@param Trustly_Data_JSONRPCRequest $request Outgoing request

@param string $body The body recieved in response to the request

@param integer $response_code the HTTP response code for the call

@return Trustly_Data_JSONRPCSignedResponse
Callback for handling the response from an API call . Takes the input data and create an instance of a response object .