Exemple #1
0
 public function testPurchaseFailure()
 {
     $httpResponse = $this->getMockHttpResponse('PurchaseFailure.txt');
     $response = new Response($this->getMockRequest(), $httpResponse->json());
     $this->assertFalse($response->isSuccessful());
     $this->assertFalse($response->isRedirect());
     $this->assertNull($response->getTransactionReference());
     $this->assertSame('The current resource was deemed invalid.', $response->getMessage());
 }
Exemple #2
0
 public function testCustomerFailure()
 {
     $httpResponse = $this->getMockHttpResponse('CustomerFailure.txt');
     $response = new Response($this->getMockRequest(), $httpResponse->json());
     $this->assertFalse($response->isSuccessful());
     $this->assertFalse($response->isRedirect());
     $this->assertNull($response->getCustomerToken());
     $this->assertSame('One or more parameters were missing or invalid', $response->getMessage());
 }