public function testSuccess()
 {
     $httpResponse = $this->getMockHttpResponse('PayoutSuccess.txt');
     $xmlElement = new \SimpleXMLElement($httpResponse->getBody(true));
     $xmlResponse = $xmlElement->children('http://schemas.xmlsoap.org/soap/envelope/')->children('http://www.ecocard.com/merchantAPI/');
     $response = new FetchTransactionResponse($this->getMockRequest(), $xmlResponse->PayoutResponse->TransactionResponse);
     $this->assertTrue($response->isSuccessful());
     $this->assertSame(0, $response->getCode());
     $this->assertSame('OK', $response->getMessage());
     $this->assertSame('2251', $response->getTransactionId());
     $this->assertSame('1865010000008350760', $response->getTransactionReference());
     $this->assertSame('0.79', $response->getAmount());
     $this->assertSame('EUR', $response->getCurrency());
     $this->assertSame('110355', $response->getMerchantAccountNumber());
     $this->assertSame('1100185585', $response->getClientAccountNumber());
     $this->assertSame('Payout', $response->getTransactionType());
     $this->assertSame('2014-10-09T10:49:25.8609586+00:00', $response->getProcessingTime());
 }
 public function testSuccess()
 {
     $httpResponse = $this->getMockHttpResponse('FetchTransactionSuccess.txt');
     $xmlElement = new \SimpleXMLElement($httpResponse->getBody(true));
     $xmlResponse = $xmlElement->children('http://schemas.xmlsoap.org/soap/envelope/')->children('http://www.ecocard.com/merchantAPI/');
     $response = new FetchTransactionResponse($this->getMockRequest(), $xmlResponse->QueryByCustomerTransactionIDResponse->TransactionResponse);
     $this->assertTrue($response->isSuccessful());
     $this->assertSame(0, $response->getCode());
     $this->assertSame('OK', $response->getMessage());
     $this->assertSame('2064', $response->getTransactionId());
     $this->assertSame('1865010000008316336', $response->getTransactionReference());
     $this->assertSame('', $response->getTransactionDescription());
     $this->assertSame('7.91', $response->getAmount());
     $this->assertSame('EUR', $response->getCurrency());
     $this->assertSame('110355', $response->getMerchantAccountNumber());
     $this->assertSame('1100185585', $response->getClientAccountNumber());
     $this->assertSame('Payout', $response->getTransactionType());
     $this->assertSame('2014-10-02T13:33:25.587', $response->getProcessingTime());
 }