Ejemplo n.º 1
0
 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());
 }
Ejemplo n.º 2
0
 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());
 }