public function testAuthorizeNoMessageNoResponseCode() { $httpResponse = $this->getMockHttpResponse('NoMessageNoResponseCodeFailure.txt'); $response = new AuthorizeResponse($this->getMockRequest(), $httpResponse->xml()); $this->assertNull($response->getMessage()); $this->assertNull($response->getResponseCode()); }
public function testAuthorizeInsufficentFunds() { $httpResponse = $this->getMockHttpResponse('AuthorizeRequestInsufficientFunds.txt'); $response = new AuthorizeResponse($this->getMockRequest(), $httpResponse->xml()); $this->assertFalse($response->isSuccessful()); $this->assertSame('Insufficient Funds', $response->getMessage()); $this->assertSame('110', $response->getResponseCode()); }