/** * @param $giropayRequest * @return mixed * @throws Exception */ public function communicateWithVendor($giropayRequest) { $httpRequest = $this->requestGenerator->buildRequest($this->httpClient, $giropayRequest); $httpResponse = $this->httpClient->send($httpRequest); $giropayResponse = $this->responseGenerator->buildResponseFromHttpResponse($httpResponse, $giropayRequest); return $giropayResponse; }
public function testTransactionStatusNoSuccessfulPayment() { $request = new GiropayTransactionStatusRequest(); $httpResponse = $this->getMockResponse('transaction-status-nouserinput.txt'); /** @var $response GiropayTransactionStatusResponse */ $response = $this->responseGenerator->buildResponseFromHttpResponse($httpResponse, $request); $this->assertInstanceOf("PHPCommerce\\Vendor\\Giropay\\Service\\Payment\\Message\\Transaction\\GiropayTransactionStatusResponse", $response); $this->assertTrue(GiropayPaymentResultType::$TIMEOUT_NO_USER_INPUT->equals($response->getPaymentResult())); }