public function testAuthorizeFailure() { $httpResponse = $this->getMockHttpResponse('AuthorizeFailure.txt'); $response = new Response($this->getMockRequest(), $httpResponse->getBody()); $this->assertFalse($response->isSuccessful()); $this->assertSame('123456789', $response->getTransactionReference()); $this->assertSame('Invalid CVV', $response->getMessage()); $this->assertSame('D', $response->getCode()); $this->assertSame('Declined', $response->getReasonCode()); $this->assertSame('', $response->getAuthorizationCode()); $this->assertSame('NNN', $response->getAVSCode()); $this->assertSame(null, $response->getCard()); }