public function testPurchaseFailure()
 {
     $httpResponse = $this->getMockHttpResponse('AIMPurchaseFailure.txt');
     $response = new AIMResponse($this->getMockRequest(), $httpResponse->getBody());
     $this->assertFalse($response->isSuccessful());
     $this->assertSame('0', $response->getTransactionReference());
     $this->assertSame('A valid amount is required.', $response->getMessage());
     $this->assertSame('3', $response->getCode());
     $this->assertSame('5', $response->getReasonCode());
     $this->assertSame('', $response->getAuthorizationCode());
     $this->assertSame('P', $response->getAVSCode());
 }
 public function testRefundFailure()
 {
     $httpResponse = $this->getMockHttpResponse('AIMRefundFailure.txt');
     $response = new AIMResponse($this->getMockRequest(), $httpResponse->getBody());
     $this->assertFalse($response->isSuccessful());
     $this->assertSame('0', $response->getTransactionReference());
     $this->assertSame('The credit card number is invalid.', $response->getMessage());
     $this->assertSame('3', $response->getCode());
     $this->assertSame('6', $response->getReasonCode());
     $this->assertSame('', $response->getAuthorizationCode());
     $this->assertSame('P', $response->getAVSCode());
 }