public function testDirectPurchaseWithToken() { $httpResponse = $this->getMockHttpResponse('DirectPurchaseWithToken.txt'); $response = new Response($this->getMockRequest(), $httpResponse->getBody()); $this->assertTrue($response->isSuccessful()); $this->assertSame('{ABCDEFGH-ABCD-ABCD-ABCD-ABCDEFGHIJKL}', $response->getToken()); }
public function testCaptureFailure() { $httpResponse = $this->getMockHttpResponse('CaptureFailure.txt'); $response = new Response($this->getMockRequest(), $httpResponse->getBody()); $this->assertFalse($response->isSuccessful()); $this->assertNull($response->getTransactionReference()); $this->assertSame('You are trying to RELEASE a transaction that has already been RELEASEd or ABORTed.', $response->getMessage()); }