public function testSendSuccess() { $this->setMockHttpResponse('RefundSuccess.txt'); $response = $this->request->send(); $this->assertInstanceOf('Omnipay\\Mollie\\Message\\RefundResponse', $response); $this->assertTrue($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertSame('tr_WDqYK6vllg', $response->getTransactionReference()); $this->assertSame('re_4qqhO89gsT', $response->getTransactionId()); }
public function testSystemFailure() { $this->setMockHttpResponse('PurchaseSystemFailure.txt'); $response = $this->request->send(); $this->assertInstanceOf('Omnipay\\Mollie\\Message\\PurchaseResponse', $response); $this->assertFalse($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertNull($response->getTransactionReference()); $this->assertNull($response->getRedirectUrl()); $this->assertNull($response->getRedirectData()); $this->assertSame("Payment platform for this payment method temporarily not available", $response->getMessage()); }
public function testSendFailure() { $this->setMockHttpResponse('PurchaseFailure.txt'); $response = $this->request->send(); $this->assertInstanceOf('Omnipay\Mollie\Message\PurchaseResponse', $response); $this->assertFalse($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertNull($response->getTransactionReference()); $this->assertNull($response->getRedirectUrl()); $this->assertNull($response->getRedirectData()); $this->assertSame("The issuer is invalid", $response->getMessage()); }